List:Commits« Previous MessageNext Message »
From:chuck.bell Date:January 30 2012 3:28pm
Subject:bzr push into mysql-5.5 branch (chuck.bell:3656) Bug#12969301
View as plain text  
 3656 chuck.bell@stripped	2012-01-30 [merge]
      Merge with main for BUG#12969301

    added:
      mysql-test/suite/innodb/r/innodb_bug12400341.result
      mysql-test/suite/innodb/t/innodb_bug12400341-master.opt
      mysql-test/suite/innodb/t/innodb_bug12400341.test
      mysql-test/suite/rpl/r/rpl_start_stop_slave.result
      mysql-test/suite/rpl/t/rpl_start_stop_slave.test
      mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result
      mysql-test/suite/sys_vars/r/innodb_trx_rseg_n_slots_debug_basic.result
      mysql-test/suite/sys_vars/r/stored_program_cache_basic.result
      mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test
      mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test
      mysql-test/suite/sys_vars/t/stored_program_cache_basic.test
    modified:
      CMakeLists.txt
      VERSION
      client/mysql_upgrade.c
      client/mysqldump.c
      cmd-line-utils/libedit/chartype.h
      cmd-line-utils/libedit/eln.c
      cmd-line-utils/libedit/readline.c
      include/m_ctype.h
      include/my_global.h
      libmysql/CMakeLists.txt
      mysql-test/collections/default.experimental
      mysql-test/extra/rpl_tests/rpl_extra_col_master.test
      mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
      mysql-test/include/have_example_plugin.inc
      mysql-test/include/have_semisync_plugin.inc
      mysql-test/include/have_simple_parser.inc
      mysql-test/include/have_udf.inc
      mysql-test/include/show_slave_status.inc
      mysql-test/include/wait_for_ndb_to_binlog.inc
      mysql-test/include/wait_for_slave_io_error.inc
      mysql-test/r/bigint.result
      mysql-test/r/ctype_utf8.result
      mysql-test/r/func_in.result
      mysql-test/r/func_str.result
      mysql-test/r/func_time.result
      mysql-test/r/init_connect.result
      mysql-test/r/key_cache.result
      mysql-test/r/mysqlcheck.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/mysqldump.result
      mysql-test/r/partition_binlog_stmt.result
      mysql-test/r/partition_key_cache.result
      mysql-test/r/range.result
      mysql-test/r/sp.result
      mysql-test/r/xa.result
      mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result
      mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
      mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result
      mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
      mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
      mysql-test/suite/rpl/r/rpl_packet.result
      mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
      mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test
      mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
      mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
      mysql-test/suite/rpl/t/rpl_log_pos.test
      mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
      mysql-test/suite/rpl/t/rpl_packet.test
      mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test
      mysql-test/suite/sys_vars/r/all_vars.result
      mysql-test/suite/sys_vars/r/character_sets_dir_basic.result
      mysql-test/suite/sys_vars/r/plugin_dir_basic.result
      mysql-test/suite/sys_vars/t/all_vars.test
      mysql-test/suite/sys_vars/t/character_sets_dir_basic.test
      mysql-test/suite/sys_vars/t/disabled.def
      mysql-test/t/bigint.test
      mysql-test/t/ctype_utf8.test
      mysql-test/t/func_str.test
      mysql-test/t/func_time.test
      mysql-test/t/init_connect.test
      mysql-test/t/key_cache.test
      mysql-test/t/mysqlcheck.test
      mysql-test/t/mysqldump.test
      mysql-test/t/partition_binlog_stmt.test
      mysql-test/t/partition_key_cache.test
      mysql-test/t/range.test
      mysql-test/t/sp.test
      mysql-test/t/udf_skip_grants-master.opt
      mysql-test/t/xa.test
      mysys/charset-def.c
      scripts/mysqld_safe.sh
      sql-common/my_time.c
      sql/item.cc
      sql/item_cmpfunc.cc
      sql/item_timefunc.cc
      sql/log_event.h
      sql/mysqld.cc
      sql/mysqld.h
      sql/rpl_mi.cc
      sql/rpl_mi.h
      sql/rpl_rli.cc
      sql/rpl_rli.h
      sql/share/errmsg-utf8.txt
      sql/slave.cc
      sql/sp_cache.cc
      sql/sp_cache.h
      sql/sql_admin.cc
      sql/sql_connect.cc
      sql/sql_parse.cc
      sql/sql_plugin.cc
      sql/sql_prepare.cc
      sql/sql_repl.cc
      sql/sql_udf.cc
      sql/sys_vars.cc
      storage/federated/ha_federated.cc
      storage/innobase/btr/btr0btr.c
      storage/innobase/btr/btr0cur.c
      storage/innobase/btr/btr0pcur.c
      storage/innobase/buf/buf0buf.c
      storage/innobase/dict/dict0load.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/ha_innodb.h
      storage/innobase/handler/handler0alter.cc
      storage/innobase/ibuf/ibuf0ibuf.c
      storage/innobase/include/btr0btr.h
      storage/innobase/include/btr0pcur.h
      storage/innobase/include/data0data.h
      storage/innobase/include/data0data.ic
      storage/innobase/include/mem0mem.ic
      storage/innobase/include/mtr0log.ic
      storage/innobase/include/row0mysql.h
      storage/innobase/include/row0sel.h
      storage/innobase/include/trx0rseg.ic
      storage/innobase/include/trx0sys.h
      storage/innobase/include/univ.i
      storage/innobase/include/ut0mem.h
      storage/innobase/include/ut0rnd.ic
      storage/innobase/lock/lock0lock.c
      storage/innobase/mem/mem0pool.c
      storage/innobase/os/os0file.c
      storage/innobase/os/os0proc.c
      storage/innobase/page/page0page.c
      storage/innobase/pars/pars0pars.c
      storage/innobase/row/row0ins.c
      storage/innobase/row/row0mysql.c
      storage/innobase/row/row0sel.c
      storage/innobase/row/row0umod.c
      storage/innobase/row/row0upd.c
      storage/innobase/srv/srv0srv.c
      storage/innobase/trx/trx0purge.c
      storage/innobase/trx/trx0rec.c
      storage/innobase/trx/trx0sys.c
      storage/innobase/ut/ut0mem.c
      storage/myisam/mi_preload.c
      strings/ctype-ucs2.c
      strings/ctype-utf8.c
      strings/dtoa.c
=== modified file 'client/mysql_plugin.c'
--- a/client/mysql_plugin.c	2011-11-11 19:44:51 +0000
+++ b/client/mysql_plugin.c	2012-01-24 16:08:57 +0000
@@ -1018,7 +1018,7 @@ static int find_plugin(char *tp_path)
   Build the boostrap file.
   
   Create a new file and populate it with SQL commands to ENABLE or DISABLE
-  the plugin via INSERT and DELETE operations on the mysql.plugin table.
+  the plugin via REPLACE and DELETE operations on the mysql.plugin table.
 
   param[in]  operation  The type of operation (ENABLE or DISABLE)
   param[out] bootstrap  A FILE* pointer
@@ -1035,12 +1035,16 @@ static int build_bootstrap_file(char *op
     Perform plugin operation : ENABLE or DISABLE
 
     The following creates a temporary bootstrap file and populates it with
-    the appropriate SQL commands for the operation. For ENABLE, INSERT
+    the appropriate SQL commands for the operation. For ENABLE, REPLACE
     statements are created. For DISABLE, DELETE statements are created. The
     values for these statements are derived from the plugin_data read from the
     <plugin_name>.ini configuration file. Once the file is built, a call to
     mysqld is made in read only, bootstrap modes to read the SQL statements
     and execute them.
+    
+    Note: Replace was used so that if a user loads a newer version of a
+          library with a different library name, the new library name is
+          used for symbols that match. 
   */
   if ((error= make_tempfile(bootstrap, "sql")))
   {
@@ -1057,7 +1061,7 @@ static int build_bootstrap_file(char *op
   if (strcasecmp(operation, "enable") == 0)
   {
     int i= 0;
-    fprintf(file, "INSERT IGNORE INTO mysql.plugin VALUES ");
+    fprintf(file, "REPLACE INTO mysql.plugin VALUES ");
     for (i= 0; i < (int)array_elements(plugin_data.components); i++)
     {
       /* stop when we read the end of the symbol list - marked with NULL */

=== added file 'mysql-test/include/libdaemon_example.ini'
--- a/mysql-test/include/libdaemon_example.ini	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/libdaemon_example.ini	2012-01-24 16:08:57 +0000
@@ -0,0 +1,9 @@
+#
+# Plugin configuration file. Place the following on a separate line:
+#
+# library binary file name (without .so or .dll)
+# component_name
+# [component_name] - additional components in plugin
+#
+liblibdaemon_example
+daemon_example

=== modified file 'mysql-test/r/mysql_plugin.result'
--- a/mysql-test/r/mysql_plugin.result	2011-10-17 19:30:28 +0000
+++ b/mysql-test/r/mysql_plugin.result	2012-01-24 16:08:57 +0000
@@ -23,12 +23,24 @@ wacky	libdaemon_example.so
 wicky	libdaemon_example.so
 wonky	libdaemon_example.so
 #
+# Ensure the plugin is loaded.
+#
+SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
+name	dl
+daemon_example	libdaemon_example.so
+#
+# Ensure the plugin is replaced.
+#
+SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
+name	dl
+daemon_example	liblibdaemon_example.so
+#
 # Disable the plugin...
 #
 #
 # Ensure the plugin isn't loaded.
 #
-SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
+SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
 name	dl
 #
 # Attempt to load non-existant plugin

=== modified file 'mysql-test/t/mysql_plugin.test'
--- a/mysql-test/t/mysql_plugin.test	2011-11-04 12:59:28 +0000
+++ b/mysql-test/t/mysql_plugin.test	2012-01-24 16:08:57 +0000
@@ -155,6 +155,74 @@ eval INSERT INTO mysql.plugin VALUES ('w
 --replace_regex /\.dll/.so/
 SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
 
+# MTR will remove this file later, but this might be too late.
+--error 0,1
+--remove_file $expect_file
+--write_file $expect_file
+wait
+EOF
+--shutdown_server 10
+--source include/wait_until_disconnected.inc
+
+#
+# Disable the plugin - to remove winky, wonky entries
+#
+--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example
+
+#
+# Enable the plugin again
+#
+--exec $MYSQL_PLUGIN_CMD ENABLE daemon_example
+
+#
+# Restart the server
+#
+--append_file $expect_file
+restart
+EOF
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--echo #
+--echo # Ensure the plugin is loaded.
+--echo #
+--replace_regex /\.dll/.so/
+SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
+
+# MTR will remove this file later, but this might be too late.
+--error 0,1
+--remove_file $expect_file
+--write_file $expect_file
+wait
+EOF
+--shutdown_server 10
+--source include/wait_until_disconnected.inc
+
+# To test the case where the same plugin is reloaded with a different soname,
+# we must copy the example daemon to a new location renaming it.
+
+let $DAEMON_RELOAD = lib$DAEMONEXAMPLE;
+--copy_file $PLUGIN_DIR/$DAEMONEXAMPLE $PLUGIN_DIR/$DAEMON_RELOAD
+--copy_file include/libdaemon_example.ini $PLUGIN_DIR/libdaemon_example.ini
+
+# Now reload it and see that it is a different name.
+--exec $MYSQL_PLUGIN_CMD ENABLE libdaemon_example 
+
+#
+# Restart the server
+#
+--append_file $expect_file
+restart
+EOF
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--echo #
+--echo # Ensure the plugin is replaced.
+--echo #
+--replace_regex /\.dll/.so/
+SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
+
 --echo #
 --echo # Disable the plugin...
 --echo #
@@ -170,7 +238,12 @@ EOF
 #
 # Disable the plugin
 #
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example
+--exec $MYSQL_PLUGIN_CMD DISABLE libdaemon_example
+
+# Remove files for last test case.
+
+--remove_file $PLUGIN_DIR/$DAEMON_RELOAD
+--remove_file $DAEMONEXAMPLE_DIR/libdaemon_example.ini
 
 #
 # Restart the server
@@ -184,7 +257,7 @@ EOF
 --echo #
 --echo # Ensure the plugin isn't loaded.
 --echo #
-SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
+SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
 
 #
 # Stop the server for error conditions

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (chuck.bell:3656) Bug#12969301chuck.bell31 Jan