[MDEV-4927] Default options file order Created: 2013-08-20 Updated: 2013-11-20 Resolved: 2013-11-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.32 |
| Fix Version/s: | 5.5.34 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Honza Horak | Assignee: | Sergei Golubchik |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux, RPM |
||
| Attachments: |
|
| Description |
|
As mentioned in https://kb.askmonty.org/en/mysqld-startup-options/:
But when defining -DINSTALL_LAYOUT=RPM in cmake call we end up with the following output of mysqld: ... which is wrong. What is happening... "RPM" layout defines DEFAULT_SYSCONFDIR macro to "/etc" and if this macro is defined, it is added to the set of directories where config files are searched in (by default only /etc, /etc/mysql and ~ are used). The problem is in the function which appends directory to the set of directories (actually a list). If the new directory is already in the set, it will be added to the end all the time, while the following items are shifted 1 position to the beginning. It means that when calling
(remember, DEFAULT_SYSCONFDIR is set to "/etc") while dirs contains "/etc" "/etc/mysql", it results in "/etc/mysql" "/etc". The result is obvious – we get wrong order of configuration files. A proposed patch is attached, but it will change behaviour on systems where -DINSTALL_LAYOUT=RPM was used during compilation. |
| Comments |
| Comment by Sergei Golubchik [ 2013-11-08 ] |
|
I tried to fix it, but after some discussion we agreed that changing the order of configuration files is too dangerous — it might introduce subtle bugs after an upgrade for anyone who relies on the current behavior. Instead, I've edited the manual to specify more clearly what files are read and from where. Besides, the manual was already saying (even before my changes) that one should use "mysqld --help --verbose" to get the exact my.cnf search path on his system. |