Bug #72340 | my_print_defaults fails to parse include directive if there is no new line | ||
---|---|---|---|
Submitted: | 14 Apr 2014 12:02 | Modified: | 17 Apr 2014 16:53 |
Reporter: | Olle Nilsson | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 5.6 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[14 Apr 2014 12:02]
Olle Nilsson
[15 Apr 2014 18:39]
Sveta Smirnova
Thank you for the report. I can not repeat described behavior: $ cat my.parent.cnf [mysqld] !include /home/sveta/SharedData/web_project/MySQL/bugs/bug72340/my.cnf $ cat my.cnf [mysqld] datadir=/will/this/work$ ~/build/mysql-5.6/bin/my_print_defaults --defaults-file=./my.parent.cnf mysqld --datadir=/will/this/work Plrease indicate which exact package of MySQL you use (file name you downloaded).
[16 Apr 2014 7:31]
Olle Nilsson
Thanks for looking into this Sveta. It appears you really do have a newline in your parent my.cnf. Otherwise your cat command would should the include file with the prompt "glued" to the end? Perhaps you edited using vi, it adds a newline silently by default. This bit me when I tried to reproduce the first time. I am using: mysql-5.6.16-linux-glibc2.5-x86_64, tar.gz download. However, I just verified the bug in 5.1 and 5.5 aswell: olle@ollen:[tmp]$ cat my.test.cnf !include /home/olle/tmp/my.inc.cnfolle@ollen:[tmp]$ ## No new line olle@ollen:[tmp]$ olle@ollen:[tmp]$ # Testing 5.1, tar.gz download olle@ollen:[tmp]$ /home/olle/src/5.1.73/bin/my_print_defaults --defaults-file=my.test.cnf mysqld olle@ollen:[tmp]$ olle@ollen:[tmp]$ # Testing 5.5, tar.gz download olle@ollen:[tmp]$ /home/olle/src/5.5.37/bin/my_print_defaults --defaults-file=my.test.cnf mysqld olle@ollen:[tmp]$ olle@ollen:[tmp]$ # Adding a newline olle@ollen:[tmp]$ echo >> my.test.cnf olle@ollen:[tmp]$ olle@ollen:[tmp]$ # Testing 5.1, tar.gz download olle@ollen:[tmp]$ /home/olle/src/5.1.73/bin/my_print_defaults --defaults-file=my.test.cnf mysqld --datadir=included-parameter olle@ollen:[tmp]$ # Success olle@ollen:[tmp]$ olle@ollen:[tmp]$ # Testing 5.5, tar.gz download olle@ollen:[tmp]$ /home/olle/src/5.5.37/bin/my_print_defaults --defaults-file=my.test.cnf mysqld --datadir=included-parameter olle@ollen:[tmp]$ # Success
[17 Apr 2014 16:53]
Sveta Smirnova
Thank you for the feedback. I misread your instructions and thought that new line symbol should be off the child file. If leading new line symbol exists in parent file issue is perfectly repeatable.
[17 Apr 2014 16:54]
Sveta Smirnova
Parent file which cannot be read properly
Attachment: my.parent.cnf (application/octet-stream, text), 79 bytes.