[MDEV-9969] mysql_install_db error processing ignore_db_dirs Created: 2016-04-22 Updated: 2016-06-20 Resolved: 2016-06-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.1.13, 10.0, 10.1 |
| Fix Version/s: | 10.0.27 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jesse Cotton | Assignee: | Alexey Botchkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream-fixed | ||
| Environment: |
CentOS 6.6, MariaDB 10.1 |
||
| Sprint: | 10.0.26 |
| Description |
|
`mysql_install_db` fails with `An error occurred while storing ignore_db_dirs to a hash.` when a `ignore_db_dirs` value is present in my.cnf.
|
| Comments |
| Comment by Elena Stepanova [ 2016-04-22 ] | |||||||
|
Please check if any files in /etc/my.cnf.d also contain the same setting. | |||||||
| Comment by Jesse Cotton [ 2016-04-22 ] | |||||||
|
I saw https://bugs.mysql.com/bug.php?id=69441. No, none of the files within /etc/my.cnf.d contain the same setting. I should probably also add that this only seems to affect mysql_install_db. If I remove ignore-db-dirs from my.cnf, run mysql_install_db, add ignore-db-dirs back to my.cnf, mysqld starts fine and processes ignore-db-dirs. | |||||||
| Comment by Jesse Cotton [ 2016-04-22 ] | |||||||
|
It just dawned on me that the parameter to mysql_install_db, `defaults-extra-file=/etc/my.cnf` might be causing mysql_install_db to process /etc/my.cnf twice since `/etc/my.cnf` is the default file. That does seem to be the case. If I run mysql_install_db with `defaults-file=/etc/my.cnf` no error is thrown. | |||||||
| Comment by Elena Stepanova [ 2016-04-22 ] | |||||||
|
That's right. But if you ran mysqld with the same defaults-extra-file, you should have experienced the same problem. | |||||||
| Comment by Jesse Cotton [ 2016-04-22 ] | |||||||
|
You're correct however mysqld isn't started with a `defaults-extra-file` parameter. I am using Puppet to deploy MariaDB and I am at the mercy of the Puppet module. I am not sure why they chose to use `defaults-extra-file` for mysql_install_db but I'll look into it. So this does look like a manifestation of https://bugs.mysql.com/bug.php?id=69441? | |||||||
| Comment by Elena Stepanova [ 2016-04-22 ] | |||||||
|
Okay, now it's clear. Thanks for the report. For a note, while experimenting with it, I've found another issue with mysql_install_db processing ignore_db_dirs.
It happens because while preparing the bootstrap command line, mysql_install_db goes through the arguments twice, so they end up being duplicated on final command line:
The specific problem with ignore-db-dir will disappear after the server part is fixed, but still providing duplicate options is not good, so it would be useful to fix the script as well. | |||||||
| Comment by Alexey Botchkov [ 2016-06-16 ] | |||||||
|
Patch for the server: | |||||||
| Comment by Alexey Botchkov [ 2016-06-16 ] | |||||||
|
Patch to the mysql_install_db scripts: http://lists.askmonty.org/pipermail/commits/2016-June/009457.html |