Reported upstream: [17 May 12:43] Laurynas Biveinis Description: Setting -DBUILD_CONFIG=mysql_release -DWITH_DEBUG=ON breaks most if not all the plugin tests in the testsuite, most of them by skipping, but some by failing. The failing tests might be buggy in themselves, i.e. they attempt to run when the required plugins are absent, but in this case this was what helped to detect this bug. Other issues here. For now I am not reporting them as separate bugs. - Skip reason: "Test requires: 'true'". Why, I certainly have /bin/true on my system! - The four failing tests should not be failing but skipped if no required plugin built. The skipped tests: rpl.rpl_semi_sync_event 'mix' w5 [ skipped ] Need semisync plugins rpl.rpl_semi_sync_event 'stmt' w4 [ skipped ] Need semisync plugins rpl.rpl_mixed_implicit_commit_binlog 'mix' w7 [ skipped ] UDF requires the environment variable \$UDF_EXAMPLE_LIB to be set (normally done by mtr) rpl.rpl_udf 'mix' w2 [ skipped ] UDF requires the environment variable \$UDF_EXAMPLE_LIB to be set (normally done by mtr) rpl.rpl_udf 'row' w3 [ skipped ] UDF requires the environment variable \$UDF_EXAMPLE_LIB to be set (normally done by mtr) rpl.rpl_stm_implicit_commit_binlog 'stmt' w1 [ skipped ] UDF requires the environment variable \$UDF_EXAMPLE_LIB to be set (normally done by mtr) rpl.rpl_udf 'stmt' w8 [ skipped ] UDF requires the environment variable \$UDF_EXAMPLE_LIB to be set (normally done by mtr) rpl.rpl_row_implicit_commit_binlog 'row' w6 [ skipped ] UDF requires the environment variable \$UDF_EXAMPLE_LIB to be set (normally done by mtr) binlog.binlog_unsafe 'stmt' w3 [ skipped ] UDF requires the environment variable \$UDF_EXAMPLE_LIB to be set (normally done by mtr) sys_vars.rpl_semi_sync_master_enabled_basic w4 [ skipped ] Need semisync plugins main.fulltext_plugin w7 [ skipped ] simple parser requires the environment variable \$SIMPLE_PARSER to be set (normally done by mtr) sys_vars.rpl_semi_sync_master_timeout_basic w4 [ skipped ] Need semisync plugins sys_vars.rpl_semi_sync_master_trace_level_basic w4 [ skipped ] Need semisync plugins sys_vars.rpl_semi_sync_master_wait_no_slave_basic w4 [ skipped ] Need semisync plugins sys_vars.rpl_semi_sync_slave_enabled_basic w4 [ skipped ] Need semisync plugins sys_vars.rpl_semi_sync_slave_trace_level_basic w4 [ skipped ] Need semisync plugins main.udf w3 [ skipped ] UDF requires the environment variable \$UDF_EXAMPLE_LIB to be set (normally done by mtr) main.udf_skip_grants w7 [ skipped ] UDF requires the environment variable \$UDF_EXAMPLE_LIB to be set (normally done by mtr) main.validate_password_plugin w6 [ skipped ] validate password requires the environment variable \$VALIDATE_PASSWORD to be set (normally done by mtr) main.wl6443_deprecation w6 [ skipped ] validate password requires the environment variable \$VALIDATE_PASSWORD to be set (normally done by mtr) main.plugin_auth_qa_2 w7 [ skipped ] Test requires: 'true' perfschema.hostcache_ipv6_auth_plugin w3 [ skipped ] Test requires: 'true' main.plugin_auth w7 [ skipped ] Test requires: 'true' main.mysql_client_test w3 [ skipped ] Test requires: 'true' main.plugin_auth_qa w7 [ skipped ] Test requires: 'true' main.plugin_auth_qa_1 w7 [ skipped ] Test requires: 'true' perfschema.hostcache_ipv4_auth_plugin w7 [ skipped ] Test requires: 'true' main.plugin_auth_qa_3 w7 [ skipped ] Test requires: 'true' The failing tests: main.audit_plugin w7 [ fail ] Test ended at 2013-05-09 06:50:27 CURRENT_TEST: main.audit_plugin mysqltest: At line 38: query 'INSTALL PLUGIN audit_null SONAME 'adt_null.$expected_extension'' failed with wrong errno 1126: 'Can't open shared library '/mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/ubuntu-raring-64bit/Percona-Server/lib/plugin/adt_null.so' (errno: 2 /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/ubuntu-raring-64bit/Percona-Server/lib/plugin/adt_null.so: cannot )', instead of 1127... main.multi_plugin_load_add2 w7 [ fail ] Test ended at 2013-05-09 06:51:00 CURRENT_TEST: main.multi_plugin_load_add2 --- /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/ubuntu-raring-64bit/Percona-Server/mysql-test/r/multi_plugin_load_add2.result 2013-05-08 10:35:57.000000000 +0300 +++ /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/ubuntu-raring-64bit/Percona-Server/mysql-test/r/multi_plugin_load_add2.reject 2013-05-09 09:50:59.000000000 +0300 @@ -8,7 +8,5 @@ WHERE PLUGIN_NAME IN ('test_plugin_server', 'qa_auth_server') ORDER BY 1; PLUGIN_NAME PLUGIN_STATUS -qa_auth_server ACTIVE -test_plugin_server ACTIVE SELECT * FROM mysql.plugin ORDER BY name; name dl mysqltest: Result length mismatch main.multi_plugin_load_add w3 [ fail ] Test ended at 2013-05-09 06:51:19 CURRENT_TEST: main.multi_plugin_load_add --- /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/ubuntu-raring-64bit/Percona-Server/mysql-test/r/multi_plugin_load_add.result 2013-05-08 10:35:57.000000000 +0300 +++ /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/ubuntu-raring-64bit/Percona-Server/mysql-test/r/multi_plugin_load_add.reject 2013-05-09 09:51:17.000000000 +0300 @@ -8,7 +8,5 @@ WHERE PLUGIN_NAME IN ('test_plugin_server', 'qa_auth_server') ORDER BY 1; PLUGIN_NAME PLUGIN_STATUS -qa_auth_server ACTIVE -test_plugin_server ACTIVE SELECT * FROM mysql.plugin ORDER BY name; name dl mysqltest: Result length mismatch main.bug12969156 w5 [ fail ] Test ended at 2013-05-09 06:58:23 CURRENT_TEST: main.bug12969156 mysqltest: At line 13: Can't initialize replace from 'replace_result $DAEMONEXAMPLE DAEMONEXAMPLE' The result from queries just before the failure was: # # Bug #12969156 : SEGMENTATION FAULT ON UNINSTALLING # DAEMON_EXAMPLE PLUGIN # How to repeat: cmake .. -DBUILD_CONFIG=mysql_release -DWITH_DEBUG=ON -DWITH_EMBEDDED_SERVER=OFF cd mysql-test ./mysql-test-run --debug-server any of above tests Suggested fix: This is all caused by MTR not finding any plugin in mysql-test/include/plugin.defs and that is caused in find_plugin() in mysql-test-run.pl: # If running debug server, plugins will be in 'debug' subdirectory $plug_file= "debug/$plug_file" if $running_debug; which is not true, there is no debug subdirectory. The fix is trivial, assuming that the bug is not the lack of debug directory in the first place: === modified file 'mysql-test/mysql-test-run.pl' --- mysql-test/mysql-test-run.pl 2013-02-20 09:31:47 +0000 +++ mysql-test/mysql-test-run.pl 2013-05-17 12:26:15 +0000 @@ -2197,16 +2197,10 @@ sub read_plugin_defs($) { my ($defs_file)= @_; - my $running_debug= 0; open(PLUGDEF, '<', $defs_file) or mtr_error("Can't read plugin defintions file $defs_file"); - # Need to check if we will be running mysqld-debug - if ($opt_debug_server) { - $running_debug= 1 if find_mysqld($basedir) =~ /mysqld-debug/; - } - while () { next if /^#/; my ($plug_file, $plug_loc, $plug_var, $plug_names)= split; @@ -2214,9 +2208,6 @@ next unless $plug_file; mtr_error("Lines in $defs_file must have 3 or 4 items") unless $plug_var; - # If running debug server, plugins will be in 'debug' subdirectory - $plug_file= "debug/$plug_file" if $running_debug; - my ($plugin)= find_plugin($plug_file, $plug_loc); # Set env. variables that tests may use, set to empty if plugin All of the tests above start passing then.