Activity log for bug #1382782

Date Who What changed Old value New value Message
2014-10-18 11:08:09 Vlad Lesin bug added bug
2014-10-18 11:09:13 Vlad Lesin nominated for series percona-server/5.5
2014-10-18 11:09:13 Vlad Lesin bug task added percona-server/5.5
2014-10-18 11:09:13 Vlad Lesin nominated for series percona-server/5.1
2014-10-18 11:09:13 Vlad Lesin bug task added percona-server/5.1
2014-10-18 11:09:13 Vlad Lesin nominated for series percona-server/5.6
2014-10-18 11:09:13 Vlad Lesin bug task added percona-server/5.6
2014-10-19 11:38:19 Launchpad Janitor branch linked lp:~vlad-lesin/percona-server/5.1-bug-1382782
2014-10-19 11:49:20 Vlad Lesin description Consider lp:mysql-server/5.6 revision 6130. If we look into scripts/mysql_install_db.pl.in lines 753-958 are responsible for invoking mysqld in bootstrap mode and feeding the following files to it: my $create_system_tables = "$pkgdatadir/mysql_system_tables.sql"; my $fill_system_tables = "$pkgdatadir/mysql_system_tables_data.sql"; The code use 'open(PIPE, "| $mysqld_install_cmd_line")' perl construction which allows easily work with pipes, but the return code of mysqld is not checked, so if something went wrong as in our case with mutually exclusive mysqld options mysql_install_db will ignore the error and continue the execution. I would propose to check the return value of perl "close" function when the pipe is closed. Here is the description how to check error code of the child on another side of pipe with "close": "If the filehandle came from a piped open, close returns false if one of the other syscalls involved fails or if its program exits with non-zero status. If the only problem was that the program exited non-zero, $! will be set to 0 . Closing a pipe also waits for the process executing on the pipe to exit--in case you wish to look at the output of the pipe afterwards--and implicitly puts the exit status value of that command into $? and ${^CHILD_ERROR_NATIVE}." (http://perldoc.perl.org/functions/close.html) In the case of unexpected mysqld termination mysql_install_db must be stopped with corresponding error message. Consider lp:mysql-server/5.6 revision 6130. If we look into scripts/mysql_install_db.pl.in lines 753-958 are responsible for invoking mysqld in bootstrap mode and feeding the following files to it: my $create_system_tables = "$pkgdatadir/mysql_system_tables.sql"; my $fill_system_tables = "$pkgdatadir/mysql_system_tables_data.sql"; The code use 'open(PIPE, "| $mysqld_install_cmd_line")' perl construction which allows easily work with pipes, but the return code of mysqld is not checked, so if something went wrong as in our case with mutually exclusive mysqld options mysql_install_db will ignore the error and continue the execution. I would propose to check the return value of perl "close" function when the pipe is closed. Here is the description how to check error code of the child on another side of pipe with "close": "If the filehandle came from a piped open, close returns false if one of the other syscalls involved fails or if its program exits with non-zero status. If the only problem was that the program exited non-zero, $! will be set to 0 . Closing a pipe also waits for the process executing on the pipe to exit--in case you wish to look at the output of the pipe afterwards--and implicitly puts the exit status value of that command into $? and ${^CHILD_ERROR_NATIVE}." (http://perldoc.perl.org/functions/close.html) In the case of unexpected mysqld termination mysql_install_db must be stopped with corresponding error message. How to repeate: Run mysql_install_db in 5.6 with --enforce-gtid-consistency=1 --autocommit=0 options. The server terminates with the following error message: ERROR: 1787 When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1. But mysql_install_db continues execution. As a result system tables will not be created and filled in.
2014-10-19 11:50:08 Vlad Lesin branch linked lp:~vlad-lesin/percona-server/5.5-bug-1382782
2014-10-19 11:50:54 Vlad Lesin branch linked lp:~vlad-lesin/percona-server/5.6-bug-1382782
2014-10-19 11:55:51 Vlad Lesin description Consider lp:mysql-server/5.6 revision 6130. If we look into scripts/mysql_install_db.pl.in lines 753-958 are responsible for invoking mysqld in bootstrap mode and feeding the following files to it: my $create_system_tables = "$pkgdatadir/mysql_system_tables.sql"; my $fill_system_tables = "$pkgdatadir/mysql_system_tables_data.sql"; The code use 'open(PIPE, "| $mysqld_install_cmd_line")' perl construction which allows easily work with pipes, but the return code of mysqld is not checked, so if something went wrong as in our case with mutually exclusive mysqld options mysql_install_db will ignore the error and continue the execution. I would propose to check the return value of perl "close" function when the pipe is closed. Here is the description how to check error code of the child on another side of pipe with "close": "If the filehandle came from a piped open, close returns false if one of the other syscalls involved fails or if its program exits with non-zero status. If the only problem was that the program exited non-zero, $! will be set to 0 . Closing a pipe also waits for the process executing on the pipe to exit--in case you wish to look at the output of the pipe afterwards--and implicitly puts the exit status value of that command into $? and ${^CHILD_ERROR_NATIVE}." (http://perldoc.perl.org/functions/close.html) In the case of unexpected mysqld termination mysql_install_db must be stopped with corresponding error message. How to repeate: Run mysql_install_db in 5.6 with --enforce-gtid-consistency=1 --autocommit=0 options. The server terminates with the following error message: ERROR: 1787 When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1. But mysql_install_db continues execution. As a result system tables will not be created and filled in. Consider lp:mysql-server/5.6 revision 6130. If we look into scripts/mysql_install_db.pl.in lines 753-958 are responsible for invoking mysqld in bootstrap mode and feeding the following files to it: my $create_system_tables = "$pkgdatadir/mysql_system_tables.sql"; my $fill_system_tables = "$pkgdatadir/mysql_system_tables_data.sql"; The code use 'open(PIPE, "| $mysqld_install_cmd_line")' perl construction which allows easily work with pipes, but the return code of mysqld is not checked, so if something went wrong (for example mutually exclusive mysqld options are used) mysql_install_db will ignore the error and continue the execution. I would propose to check the return value of perl "close" function when the pipe is closed. Here is the description how to check error code of the child on another side of pipe with "close": "If the filehandle came from a piped open, close returns false if one of the other syscalls involved fails or if its program exits with non-zero status. If the only problem was that the program exited non-zero, $! will be set to 0 . Closing a pipe also waits for the process executing on the pipe to exit--in case you wish to look at the output of the pipe afterwards--and implicitly puts the exit status value of that command into $? and ${^CHILD_ERROR_NATIVE}." (http://perldoc.perl.org/functions/close.html) In the case of unexpected mysqld termination mysql_install_db must be stopped with corresponding error message. How to repeate: Run mysql_install_db in 5.6 with --enforce-gtid-consistency=1 --autocommit=0 options. The server terminates with the following error message: ERROR: 1787 When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1. But mysql_install_db continues execution. As a result system tables will not be created and filled in.
2014-10-19 14:22:43 Valerii Kravchuk percona-server/5.6: status New Confirmed
2014-10-19 14:23:49 Valerii Kravchuk percona-server/5.5: status New Confirmed
2014-10-19 14:23:54 Valerii Kravchuk percona-server/5.1: status New Confirmed
2014-10-19 14:42:12 Laurynas Biveinis percona-server/5.1: assignee Vlad Lesin (vlad-lesin)
2014-10-19 14:42:17 Laurynas Biveinis percona-server/5.5: assignee Vlad Lesin (vlad-lesin)
2014-10-19 14:42:24 Laurynas Biveinis percona-server/5.6: assignee Vlad Lesin (vlad-lesin)
2014-10-19 14:42:38 Laurynas Biveinis percona-server/5.1: importance Undecided Medium
2014-10-19 14:42:40 Laurynas Biveinis percona-server/5.5: importance Undecided Medium
2014-10-19 14:42:42 Laurynas Biveinis percona-server/5.6: importance Undecided Medium
2014-10-19 14:42:50 Laurynas Biveinis percona-server/5.1: status Confirmed In Progress
2014-10-19 14:42:52 Laurynas Biveinis percona-server/5.5: status Confirmed In Progress
2014-10-19 14:42:54 Laurynas Biveinis percona-server/5.6: status Confirmed In Progress
2014-10-20 06:12:48 Laurynas Biveinis percona-server/5.1: status In Progress Fix Committed
2014-10-20 06:12:53 Laurynas Biveinis percona-server/5.5: status In Progress Fix Committed
2014-10-20 06:12:56 Laurynas Biveinis percona-server/5.6: status In Progress Fix Committed
2014-10-20 06:14:05 Laurynas Biveinis bug watch added http://bugs.mysql.com/bug.php?id=74440
2014-10-20 06:14:05 Laurynas Biveinis bug task added mysql-server
2014-10-20 06:14:18 Laurynas Biveinis tags upstream
2014-10-20 15:22:50 Laurynas Biveinis percona-server/5.1: milestone 5.1.73-14.13
2014-10-20 15:22:53 Laurynas Biveinis percona-server/5.5: milestone 5.5.40-37.0
2014-10-20 15:22:55 Laurynas Biveinis percona-server/5.6: milestone 5.6.21-70.0
2014-10-20 15:23:05 Laurynas Biveinis percona-server/5.1: status Fix Committed Fix Released
2014-10-20 15:23:14 Laurynas Biveinis percona-server/5.6: status Fix Committed Fix Released
2014-10-20 15:23:17 Laurynas Biveinis percona-server/5.5: status Fix Committed Fix Released