Bug #51215 | log-error partially works with version 5.5 | ||
---|---|---|---|
Submitted: | 16 Feb 2010 18:15 | Modified: | 14 Mar 2010 1:32 |
Reporter: | Sveta Smirnova | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Logging | Severity: | S3 (Non-critical) |
Version: | 5.5.99 | OS: | Any |
Assigned to: | Guilhem Bichot | CPU Architecture: | Any |
Tags: | regression |
[16 Feb 2010 18:15]
Sveta Smirnova
[25 Feb 2010 14:00]
Guilhem Bichot
I have verified that this was introduced by WL#4738 (re-engineering of server variables): revision-id:serg@mysql.com-20091222093556-8aocy9n92pdp0rwr It seems that this had made --log-error(no argument) equivalent to not specifying --log-error at all.
[26 Feb 2010 16:18]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/101692 2993 Guilhem Bichot 2010-02-26 Fix for BUG#51215 "log-error partially works with version 5.5": WL 4738 (reengineering of server variables) had broken the 5.1 behaviour of --log-error: --log-error without argument sent to stderr instead of writing to a file with an autogenerated name. @ mysql-test/t/log_error.test test that error log is created and shown in SHOW VARIABLES. Interestingly the error log's path is apparently relative if --log-error=argument is used, but may be absolute or relative if --log-error(no argument) is used (because then the path is derived from that of pidfile_name, which can be absolute or relative, depending on if autogenerated or not). @ mysql-test/t/log_error2.test test that error log is created and shown in SHOW VARIABLES @ mysql-test/t/log_error3.test test that error log is empty in SHOW VARIABLES @ sql/mysql_priv.h id for option --log-error @ sql/mysqld.cc No --log-error means "write errors to stderr", whereas --log-error without argument means "write errors to a file". So we cannot use the default logic of class sys_var_charptr, which treats "option not used" the same as "option used without argument" and uses the same default for both. We need to catch "option used", in mysqld_get_one_option(), and then "without argument". Setting to "" makes sure that init_server_components() will create the log, with an autogenerated name. @ sql/sys_vars.cc need to give the option a numeric id so that we can catch it in mysqld_get_one_option()
[5 Mar 2010 14:04]
Guilhem Bichot
tests moved to sys_vars as advised by Gluh. Pushed to next-mr-bugfixing and 6.0-codebase-bugfixing.
[5 Mar 2010 14:05]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/102442 3111 Guilhem Bichot 2010-03-05 Fix for BUG#51215 "log-error partially works with version 5.5": WL 4738 (reengineering of server variables) had broken the 5.1 behaviour of --log-error: --log-error without argument sent to stderr instead of writing to a file with an autogenerated name. @ mysql-test/suite/sys_vars/t/log_error_func.test test that error log is created and shown in SHOW VARIABLES. Interestingly the error log's path is apparently relative if --log-error=argument is used, but may be absolute or relative if --log-error(no argument) is used (because then the path is derived from that of pidfile_name, which can be absolute or relative, depending on if autogenerated or not). @ mysql-test/suite/sys_vars/t/log_error_func2.test test that error log is created and shown in SHOW VARIABLES @ mysql-test/suite/sys_vars/t/log_error_func3.test test that error log is empty in SHOW VARIABLES @ sql/mysql_priv.h id for option --log-error @ sql/mysqld.cc No --log-error means "write errors to stderr", whereas --log-error without argument means "write errors to a file". So we cannot use the default logic of class sys_var_charptr, which treats "option not used" the same as "option used without argument" and uses the same default for both. We need to catch "option used", in mysqld_get_one_option(), and then "without argument". Setting to "" makes sure that init_server_components() will create the log, with an autogenerated name. @ sql/sys_vars.cc need to give the option a numeric id so that we can catch it in mysqld_get_one_option()
[6 Mar 2010 10:30]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100306102742-yw9zzgw9ac5r65m5) (version source revid:guilhem@mysql.com-20100305140001-d0unm437s8uzz4hq) (merge vers: 6.0.14-alpha) (pib:16)
[6 Mar 2010 10:30]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100306102638-qna09hbjb5gm940h) (version source revid:guilhem@mysql.com-20100305130821-02n9vd5e42toro05) (pib:16)
[6 Mar 2010 10:59]
Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:guilhem@mysql.com-20100305130821-02n9vd5e42toro05) (merge vers: 5.5.99-m3) (pib:16)
[14 Mar 2010 1:32]
Paul DuBois
Does not appear in any released version. No changelog entry needed.