Bug #69441 | ignore-db-dir gives an error when fed via my.cnf | ||
---|---|---|---|
Submitted: | 11 Jun 2013 18:44 | Modified: | 14 Nov 2013 0:15 |
Reporter: | Brian Kroth | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Options | Severity: | S3 (Non-critical) |
Version: | 5.6.11 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[11 Jun 2013 18:44]
Brian Kroth
[12 Jun 2013 8:36]
MySQL Verification Team
Hello Brian, Thank you for the report. This is reproducible in the below scenarios: (1) Multiple --ignore-db-dir parameter used with same db_name when starting server bin/mysqld_safe --defaults-file=./my.cnf --ignore-db-dir=lost+found --ignore-db-dir=lost+found --user=mysql & (2) Duplicating ignore-db-dir=db_name entries in the conf file [ushastry@ushastry mysql-5.6.12-release]$ cat my.cnf|grep ignore ignore-db-dir=lost+found ignore-db-dir=lost+found (3) Including ignore-db-dir=db_name when starting and including same in conf file bin/mysqld_safe --defaults-file=./my.cnf --ignore-db-dir=lost+found --user=mysql & [ushastry@ushastry mysql-5.6.12-release]$ cat my.cnf|grep ignore ignore-db-dir=lost+found In all the above cases - MySQL server instead of ignoring the duplicates it fails to start server complaining below error [ERROR] An error occurred while storing ignore_db_dirs to a hash. [ERROR] Aborting Workaround: Ensure that ignore-db-dir is not duplicated Thanks, Umesh
[12 Jun 2013 11:56]
Brian Kroth
The option only appeared once in the config file, but after doing some straces I found that /opt/mysql/server/etc was symlinked to /etc/mysql so /etc/mysql/my.cnf was being read twice. That also seems like a mistake to me. Perhaps the conf reading routines should uniqify files by inode? Anyways, I'll remove that symlink for now. Thanks, Brian
[14 Nov 2013 0:15]
Paul DuBois
Noted in 5.7.3 changelog. Specifying the same directory with multiple instances of --ignore-db-dir caused a server exit.
[4 Dec 2013 11:02]
Laurynas Biveinis
mysql-server$ bzr log -r 6795 -n0 ------------------------------------------------------------ revno: 6795 [merge] committer: Georgi Kodinov <georgi.kodinov@oracle.com> branch nick: B16944177-trunk timestamp: Tue 2013-10-29 16:44:07 +0200 message: merge ------------------------------------------------------------ revno: 6776.1.1 committer: Georgi Kodinov <georgi.kodinov@oracle.com> branch nick: B16944177-trunk timestamp: Mon 2013-10-28 16:34:13 +0200 message: Bug #16944177: IGNORE-DB-DIR GIVES AN ERROR WHEN FED VIA MY.CNF Duplicate directory names specified via multiple --ignore-db-dir options are causing the server to exit. Fixed by making these duplicates be ignored (and a warning be printed in the server log). The server will still fail to start on other errors like e.g. out of memory etc while processing the ignore db directories option. Test case added. Explicit type conversion added. Fixed the algorithm to generate the CSV out of the dirs list
[18 Jun 2015 5:32]
Eugene Zheganin
Just got this on 5.6.24. 2015-06-18 05:27:11 0 [Note] /usr/local/libexec/mysqld (mysqld 5.6.24-log) starting as process 80264 ... 2015-06-18 05:27:11 80264 [ERROR] An error occurred while storing ignore_db_dirs to a hash. 2015-06-18 05:27:11 80264 [ERROR] Aborting [root@db0:/var/log]# grep ignore /usr/local/etc/my.cnf ignore-db-dir = backups replicate-ignore-db = mysql replicate-ignore-db = information_schema replicate-ignore-db = test replicate-ignore-db = performance_schema [root@db0:/var/log]#