summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergey Vojtovich <sergey.vojtovich@oracle.com>2011-01-28 15:00:54 +0300
committerSergey Vojtovich <sergey.vojtovich@oracle.com>2011-01-28 15:00:54 +0300
commit26e72b5d250e7a6f9a0d7bb446489f7939d60d48 (patch)
tree4bed415f358d913acbd297b4fe92a7df39ad524a /mysql-test
parentc920d5268bef4bd3852af496b76d1d2090291ac5 (diff)
parentcbf2f80d04773bea146aad4fdeb29c783e571dfb (diff)
downloadmariadb-git-26e72b5d250e7a6f9a0d7bb446489f7939d60d48.tar.gz
Merge.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/collections/README.experimental6
-rw-r--r--mysql-test/collections/default.experimental4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_show_binlog_events.inc17
-rw-r--r--mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc11
-rw-r--r--mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc127
-rw-r--r--mysql-test/include/plugin.defs41
-rw-r--r--mysql-test/include/restart_slave_sql.inc43
-rw-r--r--mysql-test/include/rpl_connection_master.inc2
-rw-r--r--mysql-test/include/rpl_connection_slave.inc2
-rw-r--r--mysql-test/include/rpl_connection_slave1.inc2
-rw-r--r--mysql-test/include/setup_fake_relay_log.inc3
-rw-r--r--mysql-test/include/wait_for_status_var.inc22
-rw-r--r--mysql-test/lib/My/ConfigFactory.pm16
-rw-r--r--mysql-test/lib/My/CoreDump.pm2
-rw-r--r--mysql-test/lib/My/File/Path.pm15
-rw-r--r--mysql-test/lib/My/Find.pm2
-rw-r--r--mysql-test/lib/My/Options.pm2
-rw-r--r--mysql-test/lib/My/Platform.pm2
-rw-r--r--mysql-test/lib/My/SafeProcess.pm13
-rw-r--r--mysql-test/lib/My/SafeProcess/Base.pm2
-rw-r--r--mysql-test/lib/My/SafeProcess/safe_kill_win.cc2
-rw-r--r--mysql-test/lib/My/SafeProcess/safe_process.cc2
-rw-r--r--mysql-test/lib/My/SafeProcess/safe_process_win.cc2
-rw-r--r--mysql-test/lib/My/SysInfo.pm2
-rw-r--r--mysql-test/lib/My/Test.pm14
-rw-r--r--mysql-test/lib/mtr_cases.pm9
-rw-r--r--mysql-test/lib/mtr_gcov.pl2
-rw-r--r--mysql-test/lib/mtr_gprof.pl2
-rw-r--r--mysql-test/lib/mtr_io.pl2
-rw-r--r--mysql-test/lib/mtr_match.pm2
-rw-r--r--mysql-test/lib/mtr_misc.pl19
-rw-r--r--mysql-test/lib/mtr_report.pm20
-rw-r--r--mysql-test/lib/mtr_stress.pl2
-rw-r--r--mysql-test/lib/mtr_unique.pm2
-rwxr-xr-xmysql-test/mysql-stress-test.pl9
-rwxr-xr-xmysql-test/mysql-test-run.pl302
-rw-r--r--mysql-test/r/client_xml.result6
-rw-r--r--mysql-test/r/ctype_many.result15
-rw-r--r--mysql-test/r/func_like.result5
-rw-r--r--mysql-test/r/func_math.result15
-rw-r--r--mysql-test/r/func_str.result16
-rw-r--r--mysql-test/r/grant.result1
-rw-r--r--mysql-test/r/innodb_mysql_sync.result65
-rw-r--r--mysql-test/r/join_outer.result70
-rw-r--r--mysql-test/r/mysqladmin.result8
-rw-r--r--mysql-test/r/mysqlbinlog_row_big.result8
-rw-r--r--mysql-test/r/mysqld--help-notwin.result2
-rw-r--r--mysql-test/r/mysqld--help-win.result2
-rw-r--r--mysql-test/r/mysqldump.result37
-rw-r--r--mysql-test/r/mysqltest.result37
-rw-r--r--mysql-test/r/partition_error.result13
-rw-r--r--mysql-test/r/plugin_auth.result4
-rw-r--r--mysql-test/r/select.result64
-rw-r--r--mysql-test/r/show_check.result11
-rw-r--r--mysql-test/r/type_datetime.result11
-rw-r--r--mysql-test/r/xml.result11
-rw-r--r--mysql-test/suite/bugs/t/bug57108.test2
-rw-r--r--mysql-test/suite/perfschema/r/server_init.result4
-rw-r--r--mysql-test/suite/perfschema/t/server_init.test3
-rw-r--r--mysql-test/suite/rpl/r/rpl_heartbeat_basic.result46
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result238
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result221
-rw-r--r--mysql-test/suite/rpl/r/rpl_stop_slave.result42
-rw-r--r--mysql-test/suite/rpl/t/disabled.def2
-rw-r--r--mysql-test/suite/rpl/t/rpl_cross_version.test5
-rw-r--r--mysql-test/suite/rpl/t/rpl_heartbeat_basic.test51
-rw-r--r--mysql-test/suite/rpl/t/rpl_packet.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_stop_slave.test64
-rw-r--r--mysql-test/suite/sys_vars/r/autocommit_func4.result46
-rw-r--r--mysql-test/suite/sys_vars/r/autocommit_func5.result42
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result8
-rw-r--r--mysql-test/suite/sys_vars/t/autocommit_func4-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/autocommit_func4.test1
-rw-r--r--mysql-test/suite/sys_vars/t/autocommit_func5-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/autocommit_func5.test1
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test9
-rw-r--r--mysql-test/t/bug46261.test2
-rw-r--r--mysql-test/t/ctype_many.test15
-rw-r--r--mysql-test/t/fulltext_plugin.test2
-rw-r--r--mysql-test/t/func_like.test5
-rw-r--r--mysql-test/t/func_math.test11
-rw-r--r--mysql-test/t/func_str.test11
-rw-r--r--mysql-test/t/gis.test2
-rw-r--r--mysql-test/t/innodb_mysql_sync.test133
-rw-r--r--mysql-test/t/join_outer.test82
-rw-r--r--mysql-test/t/mysqladmin.test12
-rw-r--r--mysql-test/t/mysqlbinlog_row_big.test4
-rw-r--r--mysql-test/t/mysqldump.test9
-rw-r--r--mysql-test/t/mysqltest.test6
-rw-r--r--mysql-test/t/partition_error.test16
-rw-r--r--mysql-test/t/plugin.test10
-rw-r--r--mysql-test/t/plugin_auth.test5
-rw-r--r--mysql-test/t/plugin_auth_qa_2-master.opt4
-rw-r--r--mysql-test/t/plugin_auth_qa_3-master.opt4
-rw-r--r--mysql-test/t/plugin_not_embedded.test4
-rw-r--r--mysql-test/t/select.test70
-rw-r--r--mysql-test/t/show_check.test58
-rw-r--r--mysql-test/t/type_datetime.test11
-rw-r--r--mysql-test/t/xml.test5
-rw-r--r--mysql-test/valgrind.supp9
100 files changed, 1696 insertions, 711 deletions
diff --git a/mysql-test/collections/README.experimental b/mysql-test/collections/README.experimental
index 2f5ee7b00ab..924e062b76a 100644
--- a/mysql-test/collections/README.experimental
+++ b/mysql-test/collections/README.experimental
@@ -15,9 +15,13 @@ The syntax is as follows:
and any subsequent characters are ignored.
4) The full test case name including the suite and execution mode
- must be specified, for example:
+ may be specified, for example:
main.alias 'row' # bug#00000
+4b) Now, combinations will also be covered if only the test name is
+ specified, for example:
+ rpl.rpl_ps # Covers 'row', 'mix' and 'stmt'
+
5) As an exception to item 4, the last character of the test case
specification may be an asterisk (*). In that case, all test cases that
start with the same characters up to the last letter before the asterisk
diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental
index 397d6bb6090..ea2f63314dd 100644
--- a/mysql-test/collections/default.experimental
+++ b/mysql-test/collections/default.experimental
@@ -10,9 +10,7 @@ innodb.innodb_information_schema # Bug#48883 2010-05-11 alik Test "innod
main.func_math @freebsd # Bug#43020 2010-05-04 alik main.func_math fails on FreeBSD in PB2
main.gis # Bug#52208 2010-11-24 alik gis fails on some platforms (Solaris, HP-UX, Linux)
main.gis-rtree @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
-main.information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
-main.lowercase_table2 @darwin # Bug#55509 2010-07-26 alik main.lowercase_table2 fails on Mac OSX (again)
main.outfile_loaddata @solaris # Bug#46895 2010-01-20 alik Test "outfile_loaddata" fails (reproducible)
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
@@ -21,7 +19,7 @@ main.wait_timeout @solaris # Bug#51244 2010-04-26 alik wait_timeou
rpl.rpl_heartbeat_basic # BUG#54820 2010-06-26 alik rpl.rpl_heartbeat_basic fails sporadically again
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically
-rpl.rpl_innodb_bug28430* # Bug#46029
+rpl.rpl_innodb_bug28430 # Bug#46029
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
sys_vars.plugin_dir_basic # Bug#52223 2010-11-24 alik Test "plugin_dir_basic" does not support RPM build (test) directory structure
diff --git a/mysql-test/extra/rpl_tests/rpl_show_binlog_events.inc b/mysql-test/extra/rpl_tests/rpl_show_binlog_events.inc
new file mode 100644
index 00000000000..4530f8c639a
--- /dev/null
+++ b/mysql-test/extra/rpl_tests/rpl_show_binlog_events.inc
@@ -0,0 +1,17 @@
+# Include file for rpl_show_relaylog_events.inc
+
+--let $log_type= BINLOG
+if ($is_relay_log) {
+ --let $log_type= RELAYLOG
+}
+--let $args=
+if ($binlog_file != '') {
+ --let $args= IN <FILE>
+}
+if ($binlog_limit) {
+ --let $args= $args LIMIT $binlog_limit
+}
+--echo ******** [$CURRENT_CONNECTION] SHOW $log_type EVENTS $args ********
+--source include/show_events.inc
+
+
diff --git a/mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc b/mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc
new file mode 100644
index 00000000000..411f388aaf3
--- /dev/null
+++ b/mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc
@@ -0,0 +1,11 @@
+# Include file for rpl_show_log_events.inc
+
+--let $binlog_limit=
+--source extra/rpl_tests/rpl_show_binlog_events.inc
+--let $binlog_limit= 1
+--source extra/rpl_tests/rpl_show_binlog_events.inc
+--let $binlog_limit= 1,3
+--source extra/rpl_tests/rpl_show_binlog_events.inc
+--let $binlog_limit=
+--let $binlog_file=
+--source extra/rpl_tests/rpl_show_binlog_events.inc
diff --git a/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc b/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc
index d32dd485e19..a56e08ece42 100644
--- a/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc
+++ b/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc
@@ -1,103 +1,62 @@
-- connection master
+-- source include/rpl_reset.inc
+
+-- connection master
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
-INSERT INTO t1 VALUES (4);
-INSERT INTO t1 VALUES (5);
-INSERT INTO t1 VALUES (6);
-
--- echo [MASTER] ********* SOW BINLOG EVENTS IN ... *********
--- source include/show_binlog_events.inc
-
--- echo [MASTER] ********* SOW BINLOG EVENTS *********
-let $binlog_file= ;
--- source include/show_binlog_events.inc
-
--- echo [MASTER] ********* SOW BINLOG EVENTS ... LIMIT rows *********
-let $binlog_limit= 3;
--- source include/show_binlog_events.inc
-
--- echo [MASTER] ********* SOW BINLOG EVENTS ... LIMIT offset,rows *********
-let $binlog_limit= 1,4;
--- source include/show_binlog_events.inc
-
-# clear show_binlog_event/show_relaylog_events parameters
-let $binlog_limit= ;
-
--- sync_slave_with_master
-
--- echo [SLAVE] ********* SOW BINLOG EVENTS IN ... *********
--- source include/show_binlog_events.inc
-
--- echo [SLAVE] ********* SOW BINLOG EVENTS *********
-let $binlog_file= ;
--- source include/show_binlog_events.inc
-
--- echo [SLAVE] ********* SOW BINLOG EVENTS ... LIMIT rows *********
-let $binlog_limit= 3;
--- source include/show_binlog_events.inc
-
--- echo [SLAVE] ********* SOW BINLOG EVENTS ... LIMIT offset,rows *********
-let $binlog_limit= 1,4;
--- source include/show_binlog_events.inc
-
-# clear show_binlog_event/show_relaylog_events parameters
-let $binlog_limit= ;
-
--- echo [SLAVE] ********* SOW RELAYLOG EVENTS IN ... *********
-let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
--- source include/show_relaylog_events.inc
-
--- echo [SLAVE] ********* SOW RELAYLOG EVENTS *********
-let $binlog_file= ;
--- source include/show_relaylog_events.inc
--- echo [MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT rows *********
-let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
-let $binlog_limit= 3;
--- source include/show_relaylog_events.inc
-
--- echo [MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT offset,rows *********
-let $binlog_limit= 1,3;
--- source include/show_relaylog_events.inc
+# PART I
+#
+# SHOWs contents of binary logs on the master and both, binary and
+# relay logs, on the slave.
+#
+
+--let $is_relay_log= 0
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc
+
+--sync_slave_with_master
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc
+
+--let $is_relay_log= 1
+--let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1)
+--source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc
+
+#
+# PART II
+#
+# Although this second part of the test may seem redudant it is
+# actually needed to assert that SHOW RELAYLOG EVENTS works properly
+# with respect to the ordering of the relay log in relay-log.index.
+#
+# If no file is specified with "IN" then first relay log file in
+# relay-log.index (ie, the oldest one) should be picked and its
+# contents displayed. The same happens for SHOW BINLOG EVENTS, so we
+# show them both. All in all, this is the reason for re-assert after
+# MASTER and SLAVE's FLUSH LOGS operations.
+#
FLUSH LOGS;
-let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
-
-- connection master
FLUSH LOGS;
DROP TABLE t1;
-# clear show_binlog_event/show_relaylog_events parameters
-let $binlog_file= ;
-let $binlog_limit= ;
-
--- echo [MASTER] ********* SOW BINLOG EVENTS IN ... *********
-let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
--- source include/show_binlog_events.inc
-
--- echo [MASTER] ********* SOW BINLOG EVENTS *********
-let $binlog_file= ;
--- source include/show_binlog_events.inc
+--let $is_relay_log= 0
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc
--- sync_slave_with_master
+--sync_slave_with_master
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc
--- echo [SLAVE] ********* SOW BINLOG EVENTS IN ... *********
-let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
--- source include/show_binlog_events.inc
+--let $is_relay_log= 1
+--let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1)
+--source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc
--- echo [SLAVE] ********* SOW BINLOG EVENTS *********
-let $binlog_file= ;
--- source include/show_binlog_events.inc
-
--- echo [SLAVE] ********* SOW RELAYLOG EVENTS IN ... *********
--- source include/show_relaylog_events.inc
-
--- echo [SLAVE] ********* SOW RELAYLOG EVENTS *********
-let $binlog_file= ;
--- source include/show_relaylog_events.inc
# clear show_binlog_event/show_relaylog_events parameters
let $binlog_file= ;
diff --git a/mysql-test/include/plugin.defs b/mysql-test/include/plugin.defs
new file mode 100644
index 00000000000..4da03dc2cc9
--- /dev/null
+++ b/mysql-test/include/plugin.defs
@@ -0,0 +1,41 @@
+# Definition file for plugins.
+#
+# <lib name> <directory> <variable> [<plugin name>,...]
+#
+# The following variables will be set for a plugin, where PLUGVAR
+# represents the variable name given as the 3rd item
+#
+# PLUGVAR: name of plugin file including extension .so or .dll
+# PLUGVAR_DIR: name of directory where plugin was found
+# PLUGVAR_OPT: mysqld option --plugin_dir=....
+# PLUGVAR_LOAD: option --plugin_load=.... if the 4th element is present
+#
+# If a listed plugin is not found, the corresponding variables will be
+# set to empty, they will not be unset.
+#
+# The PLUGVAR variable is not quoted, so you must remember to quote it
+# when using it in an INSTALL PLUGIN command.
+#
+# The envorinment variables can be used in tests. If adding a new plugin,
+# you are free to pick your variable name, but please keep it upper
+# case for consistency.
+#
+# The _LOAD variable will have a form
+#
+# --plugin_load=<name1>=<lib_name>;<name2>=<lib_name>.....
+#
+# with name1, name2 etc from the comma separated list of plugin names
+# in the optional 4th argument.
+
+auth_test_plugin plugin/auth PLUGIN_AUTH test_plugin_server
+qa_auth_interface plugin/auth PLUGIN_AUTH_INTERFACE qa_auth_interface
+qa_auth_server plugin/auth PLUGIN_AUTH_SERVER qa_auth_server
+qa_auth_client plugin/auth PLUGIN_AUTH_CLIENT qa_auth_client
+udf_example sql UDF_EXAMPLE_LIB
+ha_example storage/example EXAMPLE_PLUGIN EXAMPLE
+semisync_master plugin/semisync SEMISYNC_MASTER_PLUGIN
+semisync_slave plugin/semisync SEMISYNC_SLAVE_PLUGIN
+ha_archive storage/archive ARCHIVE_PLUGIN
+ha_blackhole storage/blackhole BLACKHOLE_PLUGIN
+ha_federated storage/federated FEDERATED_PLUGIN
+mypluglib plugin/fulltext SIMPLE_PARSER
diff --git a/mysql-test/include/restart_slave_sql.inc b/mysql-test/include/restart_slave_sql.inc
new file mode 100644
index 00000000000..ee6c6d7ced6
--- /dev/null
+++ b/mysql-test/include/restart_slave_sql.inc
@@ -0,0 +1,43 @@
+# ==== Purpose ====
+#
+# Provide a earier way to restart SQL thread when you want to stop sql thread
+# and then start it immediately.
+#
+# Sources stop_slave_sql.inc to stop SQL thread on the current connection.
+# Then issues START SLAVE SQL_THREAD and then waits until
+# the SQL threads have started, or until a timeout is reached.
+#
+# Please use this instead of 'STOP|START SLAVE SQL_THREAD', to reduce the risk of
+# test case bugs.
+#
+#
+# ==== Usage ====
+#
+# [--let $slave_timeout= NUMBER]
+# [--let $rpl_debug= 1]
+# --source include/restart_slave_sql.inc
+#
+# Parameters:
+# $slave_timeout
+# See include/wait_for_slave_param.inc
+#
+# $rpl_debug
+# See include/rpl_init.inc
+
+
+--let $include_filename= restart_slave.inc
+--source include/begin_include_file.inc
+
+
+if (!$rpl_debug)
+{
+ --disable_query_log
+}
+
+source include/stop_slave_sql.inc;
+START SLAVE SQL_THREAD;
+source include/wait_for_slave_sql_to_start.inc;
+
+
+--let $include_filename= restart_slave.inc
+--source include/end_include_file.inc \ No newline at end of file
diff --git a/mysql-test/include/rpl_connection_master.inc b/mysql-test/include/rpl_connection_master.inc
new file mode 100644
index 00000000000..e54e34071c8
--- /dev/null
+++ b/mysql-test/include/rpl_connection_master.inc
@@ -0,0 +1,2 @@
+let $rpl_connection_name= master;
+source include/rpl_connection.inc; \ No newline at end of file
diff --git a/mysql-test/include/rpl_connection_slave.inc b/mysql-test/include/rpl_connection_slave.inc
new file mode 100644
index 00000000000..ef3876394d6
--- /dev/null
+++ b/mysql-test/include/rpl_connection_slave.inc
@@ -0,0 +1,2 @@
+let $rpl_connection_name= slave;
+source include/rpl_connection.inc; \ No newline at end of file
diff --git a/mysql-test/include/rpl_connection_slave1.inc b/mysql-test/include/rpl_connection_slave1.inc
new file mode 100644
index 00000000000..8aee6defbdd
--- /dev/null
+++ b/mysql-test/include/rpl_connection_slave1.inc
@@ -0,0 +1,2 @@
+let $rpl_connection_name= slave1;
+source include/rpl_connection.inc; \ No newline at end of file
diff --git a/mysql-test/include/setup_fake_relay_log.inc b/mysql-test/include/setup_fake_relay_log.inc
index da3ce8e6038..4f1d4f6f162 100644
--- a/mysql-test/include/setup_fake_relay_log.inc
+++ b/mysql-test/include/setup_fake_relay_log.inc
@@ -74,6 +74,7 @@ let $_fake_relay_index= $_fake_datadir/$_fake_filename.index;
let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`;
RESET SLAVE;
+let $_orphan_relay_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
# Create relay log file.
--copy_file $fake_relay_log $_fake_relay_log
@@ -102,6 +103,8 @@ RESET SLAVE;
# Setup replication from existing relay log.
eval CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE='$_fake_filename-fake.000001', RELAY_LOG_POS=4;
+# remove the orphan log file (became spurious)
+-- remove_file $_fake_datadir/$_orphan_relay_file
--let $include_filename= setup_fake_relay_log.inc
--source include/end_include_file.inc
diff --git a/mysql-test/include/wait_for_status_var.inc b/mysql-test/include/wait_for_status_var.inc
index 9f4962aeaed..5c68254f00e 100644
--- a/mysql-test/include/wait_for_status_var.inc
+++ b/mysql-test/include/wait_for_status_var.inc
@@ -50,8 +50,23 @@ if (!$_status_var_comparsion)
let $_status_var_comparsion= =;
}
+# Get type of variable
+let $_is_number= 0;
+if (`SELECT '$status_var_value' REGEXP '^[\+\-]*[0-9]+(\.[0-9]+)*\$'`)
+{
+ let $_is_number= 1;
+}
+
let $_show_status_value= query_get_value("SHOW $status_type STATUS LIKE '$status_var'", Value, 1);
-while (`SELECT NOT('$_show_status_value' $_status_var_comparsion '$status_var_value')`)
+
+# Set way of comparing
+let $_query= SELECT NOT('$_show_status_value' $_status_var_comparsion '$status_var_value');
+if ($is_number)
+{
+ let $_query= SELECT NOT($_show_status_value $_status_var_comparsion $status_var_value);
+}
+
+while (`$_query`)
{
if (!$_status_timeout_counter)
{
@@ -65,4 +80,9 @@ while (`SELECT NOT('$_show_status_value' $_status_var_comparsion '$status_var_va
dec $_status_timeout_counter;
sleep 0.1;
let $_show_status_value= query_get_value("SHOW $status_type STATUS LIKE '$status_var'", Value, 1);
+ let $_query= SELECT NOT('$_show_status_value' $_status_var_comparsion '$status_var_value');
+ if ($is_number)
+ {
+ let $_query= SELECT NOT($_show_status_value $_status_var_comparsion $status_var_value);
+ }
}
diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm
index 19c3ee4d5d8..6ba23754890 100644
--- a/mysql-test/lib/My/ConfigFactory.pm
+++ b/mysql-test/lib/My/ConfigFactory.pm
@@ -1,4 +1,20 @@
# -*- cperl -*-
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; version 2
+# of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
package My::ConfigFactory;
use strict;
diff --git a/mysql-test/lib/My/CoreDump.pm b/mysql-test/lib/My/CoreDump.pm
index 3ac9e385070..c0f6535b96e 100644
--- a/mysql-test/lib/My/CoreDump.pm
+++ b/mysql-test/lib/My/CoreDump.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/My/File/Path.pm b/mysql-test/lib/My/File/Path.pm
index 25a26568eee..d1ac2b432ac 100644
--- a/mysql-test/lib/My/File/Path.pm
+++ b/mysql-test/lib/My/File/Path.pm
@@ -1,4 +1,19 @@
# -*- cperl -*-
+# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
package My::File::Path;
use strict;
diff --git a/mysql-test/lib/My/Find.pm b/mysql-test/lib/My/Find.pm
index b2fec0d77b8..a44c9a7508c 100644
--- a/mysql-test/lib/My/Find.pm
+++ b/mysql-test/lib/My/Find.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/My/Options.pm b/mysql-test/lib/My/Options.pm
index 3bfbe1fc90e..dcd934084e2 100644
--- a/mysql-test/lib/My/Options.pm
+++ b/mysql-test/lib/My/Options.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/My/Platform.pm b/mysql-test/lib/My/Platform.pm
index 371120ab644..cbe8f929d71 100644
--- a/mysql-test/lib/My/Platform.pm
+++ b/mysql-test/lib/My/Platform.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm
index 461897b56f0..f87b7b60bd6 100644
--- a/mysql-test/lib/My/SafeProcess.pm
+++ b/mysql-test/lib/My/SafeProcess.pm
@@ -1,14 +1,15 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
diff --git a/mysql-test/lib/My/SafeProcess/Base.pm b/mysql-test/lib/My/SafeProcess/Base.pm
index 9a6871264b8..c0c70e48082 100644
--- a/mysql-test/lib/My/SafeProcess/Base.pm
+++ b/mysql-test/lib/My/SafeProcess/Base.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/My/SafeProcess/safe_kill_win.cc b/mysql-test/lib/My/SafeProcess/safe_kill_win.cc
index f72b851d0b6..72fe874e621 100644
--- a/mysql-test/lib/My/SafeProcess/safe_kill_win.cc
+++ b/mysql-test/lib/My/SafeProcess/safe_kill_win.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 MySQL AB
+/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/My/SafeProcess/safe_process.cc b/mysql-test/lib/My/SafeProcess/safe_process.cc
index 1c778362975..477beca0ada 100644
--- a/mysql-test/lib/My/SafeProcess/safe_process.cc
+++ b/mysql-test/lib/My/SafeProcess/safe_process.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 MySQL AB
+/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/My/SafeProcess/safe_process_win.cc b/mysql-test/lib/My/SafeProcess/safe_process_win.cc
index 8fffede0b62..50e16ff25d4 100644
--- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc
+++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 MySQL AB
+/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/My/SysInfo.pm b/mysql-test/lib/My/SysInfo.pm
index f1ba5fb610f..b8569e415e8 100644
--- a/mysql-test/lib/My/SysInfo.pm
+++ b/mysql-test/lib/My/SysInfo.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/My/Test.pm b/mysql-test/lib/My/Test.pm
index 68b100f91af..c756a677052 100644
--- a/mysql-test/lib/My/Test.pm
+++ b/mysql-test/lib/My/Test.pm
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2008 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index f1f1ac35dcd..c3dd43c12ca 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -229,8 +229,11 @@ sub collect_test_cases ($$$$) {
sub split_testname {
my ($test_name)= @_;
- # Get rid of directory part and split name on .'s
- my @parts= split(/\./, basename($test_name));
+ # If .test file name is used, get rid of directory part
+ $test_name= basename($test_name) if $test_name =~ /\.test$/;
+
+ # Now split name on .'s
+ my @parts= split(/\./, $test_name);
if (@parts == 1){
# Only testname given, ex: alias
diff --git a/mysql-test/lib/mtr_gcov.pl b/mysql-test/lib/mtr_gcov.pl
index f531889b08d..d8fb1c0a07d 100644
--- a/mysql-test/lib/mtr_gcov.pl
+++ b/mysql-test/lib/mtr_gcov.pl
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004, 2006 MySQL AB
+# Copyright (C) 2004, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/mtr_gprof.pl b/mysql-test/lib/mtr_gprof.pl
index 5820a4007b8..a5e05b28723 100644
--- a/mysql-test/lib/mtr_gprof.pl
+++ b/mysql-test/lib/mtr_gprof.pl
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004 MySQL AB
+# Copyright (C) 2004 MySQL AB, 2009 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/mtr_io.pl b/mysql-test/lib/mtr_io.pl
index 21581798ddc..6a6b3a3d028 100644
--- a/mysql-test/lib/mtr_io.pl
+++ b/mysql-test/lib/mtr_io.pl
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2004-2007 MySQL AB, 2008 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/mtr_match.pm b/mysql-test/lib/mtr_match.pm
index 40afd4e0336..6fc9832ac43 100644
--- a/mysql-test/lib/mtr_match.pm
+++ b/mysql-test/lib/mtr_match.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2004-2008 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl
index dc9928d37c5..678d3829226 100644
--- a/mysql-test/lib/mtr_misc.pl
+++ b/mysql-test/lib/mtr_misc.pl
@@ -1,15 +1,16 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
+# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; version 2
+# of the License.
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm
index af75178473d..f86be0d4c68 100644
--- a/mysql-test/lib/mtr_report.pm
+++ b/mysql-test/lib/mtr_report.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright 2004-2008 MySQL AB, 2008 Sun Microsystems, Inc.
+# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -129,7 +129,8 @@ sub mtr_report_test ($) {
# Find out if this test case is an experimental one, so we can treat
# the failure as an expected failure instead of a regression.
for my $exp ( @$::experimental_test_cases ) {
- if ( $exp ne $test_name ) {
+ # Include pattern match for combinations
+ if ( $exp ne $test_name && $test_name !~ /^$exp / ) {
# if the expression is not the name of this test case, but has
# an asterisk at the end, determine if the characters up to
# but excluding the asterisk are the same
@@ -395,7 +396,7 @@ sub mtr_report_stats ($$;$) {
##############################################################################
sub mtr_print_line () {
- print '-' x 60 . "\n";
+ print '-' x 74 . "\n";
}
@@ -405,13 +406,18 @@ sub mtr_print_thick_line {
}
-sub mtr_print_header () {
+sub mtr_print_header ($) {
+ my ($wid) = @_;
print "\n";
printf "TEST";
- print " " x 38;
+ if ($wid) {
+ print " " x 34 . "WORKER ";
+ } else {
+ print " " x 38;
+ }
print "RESULT ";
- print "TIME (ms)" if $timer;
- print "\n";
+ print "TIME (ms) or " if $timer;
+ print "COMMENT\n";
mtr_print_line();
print "\n";
}
diff --git a/mysql-test/lib/mtr_stress.pl b/mysql-test/lib/mtr_stress.pl
index 702bc178ae5..ab4214791d0 100644
--- a/mysql-test/lib/mtr_stress.pl
+++ b/mysql-test/lib/mtr_stress.pl
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2006 MySQL AB
+# Copyright (C) 2004-2007 MySQL AB, 2009 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/mtr_unique.pm b/mysql-test/lib/mtr_unique.pm
index 6b60157422d..506af448266 100644
--- a/mysql-test/lib/mtr_unique.pm
+++ b/mysql-test/lib/mtr_unique.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2006 MySQL AB
+# Copyright (C) 2006-2008 MySQL AB, 2009 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/mysql-stress-test.pl b/mysql-test/mysql-stress-test.pl
index bca7731d8a7..f2471d169d1 100755
--- a/mysql-test/mysql-stress-test.pl
+++ b/mysql-test/mysql-stress-test.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# Copyright (C) 2005, 2006 MySQL AB
+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
@@ -12,10 +12,9 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# ======================================================================
# MySQL server stress test system
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 01a5aaabbca..6b08e671545 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# -*- cperl -*-
-# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
##############################################################################
@@ -108,6 +108,7 @@ require "lib/mtr_misc.pl";
$SIG{INT}= sub { mtr_error("Got ^C signal"); };
our $mysql_version_id;
+my $mysql_version_extra;
our $glob_mysql_test_dir;
our $basedir;
our $bindir;
@@ -131,10 +132,6 @@ my $opt_start_dirty;
my $opt_start_exit;
my $start_only;
-my $auth_interface_fn; # the name of qa_auth_interface plugin
-my $auth_server_fn; # the name of qa_auth_server plugin
-my $auth_client_fn; # the name of qa_auth_client plugin
-my $auth_filename; # the name of the authentication test plugin
my $auth_plugin; # the path to the authentication test plugin
END {
@@ -295,8 +292,10 @@ our $opt_include_ndbcluster= 0;
our $opt_skip_ndbcluster= 1;
my $exe_ndbd;
+my $exe_ndbmtd;
my $exe_ndb_mgmd;
my $exe_ndb_waiter;
+my $exe_ndb_mgm;
our $debug_compiled_binaries;
@@ -442,7 +441,7 @@ sub main {
mtr_report();
mtr_print_thick_line();
- mtr_print_header();
+ mtr_print_header($opt_parallel > 1);
mark_time_used('init');
@@ -509,8 +508,8 @@ sub run_test_server ($$$) {
my $num_failed_test= 0; # Number of tests failed so far
# Scheduler variables
- my $max_ndb= $childs / 2;
- $max_ndb = 4 if $max_ndb > 4;
+ my $max_ndb= $ENV{MTR_MAX_NDB} || $childs / 2;
+ $max_ndb = $childs if $max_ndb > $childs;
$max_ndb = 1 if $max_ndb < 1;
my $num_ndb_tests= 0;
@@ -1124,27 +1123,7 @@ sub command_line_setup {
"$basedir/sql/share/charsets",
"$basedir/share/charsets");
- # Look for auth test plugins
- if (IS_WINDOWS)
- {
- $auth_filename = "auth_test_plugin.dll";
- $auth_interface_fn = "qa_auth_interface.dll";
- $auth_server_fn = "qa_auth_server.dll";
- $auth_client_fn = "qa_auth_client.dll";
- }
- else
- {
- $auth_filename = "auth_test_plugin.so";
- $auth_interface_fn = "qa_auth_interface.so";
- $auth_server_fn = "qa_auth_server.so";
- $auth_client_fn = "qa_auth_client.so";
- }
- $auth_plugin=
- mtr_file_exists(vs_config_dirs('plugin/auth/',$auth_filename),
- "$basedir/plugin/auth/.libs/" . $auth_filename,
- "$basedir/lib/mysql/plugin/" . $auth_filename,
- "$basedir/lib/plugin/" . $auth_filename);
-
+ ($auth_plugin)= find_plugin("auth_test_plugin", "plugin/auth");
if (using_extern())
{
@@ -1689,12 +1668,13 @@ sub collect_mysqld_features {
# Look for version
my $exe_name= basename($exe_mysqld);
mtr_verbose("exe_name: $exe_name");
- if ( $line =~ /^\S*$exe_name\s\sVer\s([0-9]*)\.([0-9]*)\.([0-9]*)/ )
+ if ( $line =~ /^\S*$exe_name\s\sVer\s([0-9]*)\.([0-9]*)\.([0-9]*)([^\s]*)/ )
{
#print "Major: $1 Minor: $2 Build: $3\n";
$mysql_version_id= $1*10000 + $2*100 + $3;
#print "mysql_version_id: $mysql_version_id\n";
mtr_report("MySQL Version $1.$2.$3");
+ $mysql_version_extra= $4;
}
}
else
@@ -1779,12 +1759,13 @@ sub collect_mysqld_features_from_running_server ()
# Parse version
my $version_str= $mysqld_variables{'version'};
- if ( $version_str =~ /^([0-9]*)\.([0-9]*)\.([0-9]*)/ )
+ if ( $version_str =~ /^([0-9]*)\.([0-9]*)\.([0-9]*)([^\s]*)/ )
{
#print "Major: $1 Minor: $2 Build: $3\n";
$mysql_version_id= $1*10000 + $2*100 + $3;
#print "mysql_version_id: $mysql_version_id\n";
mtr_report("MySQL Version $1.$2.$3");
+ $mysql_version_extra= $4;
}
mtr_error("Could not find version of MySQL") unless $mysql_version_id;
}
@@ -1831,16 +1812,42 @@ sub executable_setup () {
if ( ! $opt_skip_ndbcluster )
{
+ # Look for single threaded NDB
$exe_ndbd=
my_find_bin($bindir,
["storage/ndb/src/kernel", "libexec", "sbin", "bin"],
"ndbd");
+ # Look for multi threaded NDB
+ $exe_ndbmtd=
+ my_find_bin($bindir,
+ ["storage/ndb/src/kernel", "libexec", "sbin", "bin"],
+ "ndbmtd", NOT_REQUIRED);
+ if ($exe_ndbmtd)
+ {
+ my $mtr_ndbmtd = $ENV{MTR_NDBMTD};
+ if ($mtr_ndbmtd)
+ {
+ mtr_report(" - multi threaded ndbd found, will be used always");
+ $exe_ndbd = $exe_ndbmtd;
+ }
+ else
+ {
+ mtr_report(" - multi threaded ndbd found, will be ".
+ "used \"round robin\"");
+ }
+ }
+
$exe_ndb_mgmd=
my_find_bin($bindir,
["storage/ndb/src/mgmsrv", "libexec", "sbin", "bin"],
"ndb_mgmd");
+ $exe_ndb_mgm=
+ my_find_bin($bindir,
+ ["storage/ndb/src/mgmclient", "bin"],
+ "ndb_mgm");
+
$exe_ndb_waiter=
my_find_bin($bindir,
["storage/ndb/tools/", "bin"],
@@ -1983,6 +1990,53 @@ sub find_plugin($$)
return $lib_example_plugin;
}
+#
+# Read plugin defintions file
+#
+
+sub read_plugin_defs($)
+{
+ my ($defs_file)= @_;
+
+ open(PLUGDEF, '<', $defs_file)
+ or mtr_error("Can't read plugin defintions file $defs_file");
+
+ while (<PLUGDEF>) {
+ next if /^#/;
+ my ($plug_file, $plug_loc, $plug_var, $plug_names)= split;
+ # Allow empty lines
+ next unless $plug_file;
+ mtr_error("Lines in $defs_file must have 3 or 4 items") unless $plug_var;
+
+ my ($plugin)= find_plugin($plug_file, $plug_loc);
+
+ # Set env. variables that tests may use, set to empty if plugin
+ # listed in def. file but not found.
+
+ if ($plugin) {
+ $ENV{$plug_var}= basename($plugin);
+ $ENV{$plug_var.'_DIR'}= dirname($plugin);
+ $ENV{$plug_var.'_OPT'}= "--plugin-dir=".dirname($plugin);
+ if ($plug_names) {
+ my $lib_name= basename($plugin);
+ my $load_var= "--plugin_load=";
+ my $semi= '';
+ foreach my $plug_name (split (',', $plug_names)) {
+ $load_var .= $semi . "$plug_name=$lib_name";
+ $semi= ';';
+ }
+ $ENV{$plug_var.'_LOAD'}= $load_var;
+ }
+ } else {
+ $ENV{$plug_var}= "";
+ $ENV{$plug_var.'_DIR'}= "";
+ $ENV{$plug_var.'_OPT'}= "";
+ $ENV{$plug_var.'_LOAD'}= "" if $plug_names;
+ }
+ }
+ close PLUGDEF;
+}
+
sub environment_setup {
umask(022);
@@ -2019,127 +2073,16 @@ sub environment_setup {
}
# --------------------------------------------------------------------------
- # Add the path where mysqld will find udf_example.so
- # --------------------------------------------------------------------------
- my $udf_example_filename;
- if (IS_WINDOWS)
- {
- $udf_example_filename = "udf_example.dll";
- }
- else
- {
- $udf_example_filename = "udf_example.so";
- }
- my $lib_udf_example=
- mtr_file_exists(vs_config_dirs('sql', $udf_example_filename),
- "$basedir/sql/.libs/$udf_example_filename",);
-
- if ( $lib_udf_example )
- {
- push(@ld_library_paths, dirname($lib_udf_example));
- }
-
- $ENV{'UDF_EXAMPLE_LIB'}=
- ($lib_udf_example ? basename($lib_udf_example) : "");
- $ENV{'UDF_EXAMPLE_LIB_OPT'}= "--plugin-dir=".
- ($lib_udf_example ? dirname($lib_udf_example) : "");
-
- # --------------------------------------------------------------------------
- # Add the path where mysqld will find the auth test plugin (dialog.so/dll)
- # --------------------------------------------------------------------------
- if ($auth_plugin)
- {
- $ENV{'PLUGIN_AUTH'}= basename($auth_plugin);
- $ENV{'PLUGIN_AUTH_OPT'}= "--plugin-dir=".dirname($auth_plugin);
-
- $ENV{'PLUGIN_AUTH_LOAD'}="--plugin_load=test_plugin_server=".$auth_filename;
- $ENV{'PLUGIN_AUTH_INTERFACE'}="--plugin_load=qa_auth_interface=".$auth_interface_fn;
- $ENV{'PLUGIN_AUTH_SERVER'}="--plugin_load=qa_auth_server=".$auth_server_fn;
- $ENV{'PLUGIN_AUTH_CLIENT'}="--plugin_load=qa_auth_client=".$auth_client_fn;
- }
- else
- {
- $ENV{'PLUGIN_AUTH'}= "";
- $ENV{'PLUGIN_AUTH_OPT'}="--plugin-dir=";
- $ENV{'PLUGIN_AUTH_LOAD'}="";
- $ENV{'PLUGIN_AUTH_INTERFACE'}="";
- $ENV{'PLUGIN_AUTH_SERVER'}="";
- $ENV{'PLUGIN_AUTH_CLIENT'}="";
- }
-
-
- # --------------------------------------------------------------------------
- # Add the path where mysqld will find ha_example.so
- # --------------------------------------------------------------------------
- if ($mysql_version_id >= 50100) {
- my ($lib_example_plugin) = find_plugin("ha_example", "storage/example");
-
- if($lib_example_plugin)
- {
- $ENV{'EXAMPLE_PLUGIN'}=
- ($lib_example_plugin ? basename($lib_example_plugin) : "");
- $ENV{'EXAMPLE_PLUGIN_OPT'}= "--plugin-dir=".
- ($lib_example_plugin ? dirname($lib_example_plugin) : "");
-
- $ENV{'HA_EXAMPLE_SO'}="'".basename($lib_example_plugin)."'";
- $ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=EXAMPLE=".basename($lib_example_plugin);
- }
- else
- {
- # Some ".opt" files use some of these variables, so they must be defined
- $ENV{'EXAMPLE_PLUGIN'}= "";
- $ENV{'EXAMPLE_PLUGIN_OPT'}= "";
- $ENV{'HA_EXAMPLE_SO'}= "";
- $ENV{'EXAMPLE_PLUGIN_LOAD'}= "";
- }
- }
-
-
- # --------------------------------------------------------------------------
- # Add the path where mysqld will find semisync plugins
+ # Read definitions from include/plugin.defs
+ #
+ # Plugin settings should no longer be added here, instead
+ # place definitions in include/plugin.defs.
+ # See comment in that file for details.
# --------------------------------------------------------------------------
- if (!$opt_embedded_server) {
+ read_plugin_defs("include/plugin.defs");
-
- my ($lib_semisync_master_plugin) = find_plugin("semisync_master", "plugin/semisync");
- my ($lib_semisync_slave_plugin) = find_plugin("semisync_slave", "plugin/semisync");
-
-
- if ($lib_semisync_master_plugin && $lib_semisync_slave_plugin)
- {
- $ENV{'SEMISYNC_MASTER_PLUGIN'}= basename($lib_semisync_master_plugin);
- $ENV{'SEMISYNC_SLAVE_PLUGIN'}= basename($lib_semisync_slave_plugin);
- $ENV{'SEMISYNC_PLUGIN_OPT'}= "--plugin-dir=".dirname($lib_semisync_master_plugin);
- }
- else
- {
- $ENV{'SEMISYNC_MASTER_PLUGIN'}= "";
- $ENV{'SEMISYNC_SLAVE_PLUGIN'}= "";
- $ENV{'SEMISYNC_PLUGIN_OPT'}="--plugin-dir=";
- }
- }
-
- # ----------------------------------------------------
- # Add the paths where mysqld will find archive/blackhole/federated plugins.
- # ----------------------------------------------------
- $ENV{'ARCHIVE_PLUGIN_DIR'} =
- dirname(find_plugin("ha_archive", "storage/archive"));
- $ENV{'BLACKHOLE_PLUGIN_DIR'} =
- dirname(find_plugin("ha_blackhole", "storage/blackhole"));
- $ENV{'FEDERATED_PLUGIN_DIR'} =
- dirname(find_plugin("ha_federated", "storage/federated"));
-
- # ----------------------------------------------------
- # Add the path where mysqld will find mypluglib.so
- # ----------------------------------------------------
-
- my ($lib_simple_parser) = find_plugin("mypluglib", "plugin/fulltext");
-
- $ENV{'MYPLUGLIB_SO'}="'".basename($lib_simple_parser)."'";
- $ENV{'SIMPLE_PARSER'}=
- ($lib_simple_parser ? basename($lib_simple_parser) : "");
- $ENV{'SIMPLE_PARSER_OPT'}= "--plugin-dir=".
- ($lib_simple_parser ? dirname($lib_simple_parser) : "");
+ # Simplify reference to semisync plugins
+ $ENV{'SEMISYNC_PLUGIN_OPT'}= $ENV{'SEMISYNC_MASTER_PLUGIN_OPT'};
# --------------------------------------------------------------------------
# Valgrind need to be run with debug libraries otherwise it's almost
@@ -2608,6 +2551,17 @@ sub vs_config_dirs ($$) {
sub check_ndbcluster_support ($) {
my $mysqld_variables= shift;
+ # Check if this is MySQL Cluster, ie. mysql version string ends
+ # with -ndb-Y.Y.Y[-status]
+ if ( defined $mysql_version_extra &&
+ $mysql_version_extra =~ /^-ndb-/ )
+ {
+ mtr_report(" - MySQL Cluster");
+ # Enable ndb engine and add more test suites
+ $opt_include_ndbcluster = 1;
+ $DEFAULT_SUITES.=",ndb";
+ }
+
if ($opt_include_ndbcluster)
{
$opt_skip_ndbcluster= 0;
@@ -2720,6 +2674,27 @@ sub ndb_mgmd_wait_started($) {
return 1;
}
+sub ndb_mgmd_stop{
+ my $ndb_mgmd= shift or die "usage: ndb_mgmd_stop(<ndb_mgmd>)";
+
+ my $host=$ndb_mgmd->value('HostName');
+ my $port=$ndb_mgmd->value('PortNumber');
+ mtr_verbose("Stopping cluster '$host:$port'");
+
+ my $args;
+ mtr_init_args(\$args);
+ mtr_add_arg($args, "--ndb-connectstring=%s:%s", $host,$port);
+ mtr_add_arg($args, "-e");
+ mtr_add_arg($args, "shutdown");
+
+ My::SafeProcess->run
+ (
+ name => "ndb_mgm shutdown $host:$port",
+ path => $exe_ndb_mgm,
+ args => \$args,
+ output => "/dev/null",
+ );
+}
sub ndb_mgmd_start ($$) {
my ($cluster, $ndb_mgmd)= @_;
@@ -2747,6 +2722,7 @@ sub ndb_mgmd_start ($$) {
error => $path_ndb_mgmd_log,
append => 1,
verbose => $opt_verbose,
+ shutdown => sub { ndb_mgmd_stop($ndb_mgmd) },
);
mtr_verbose("Started $ndb_mgmd->{proc}");
@@ -2762,6 +2738,12 @@ sub ndb_mgmd_start ($$) {
return 0;
}
+sub ndbd_stop {
+ # Intentionally left empty, ndbd nodes will be shutdown
+ # by sending "shutdown" to ndb_mgmd
+}
+
+my $exe_ndbmtd_counter= 0;
sub ndbd_start {
my ($cluster, $ndbd)= @_;
@@ -2779,17 +2761,24 @@ sub ndbd_start {
# > 5.0 { 'character-sets-dir' => \&fix_charset_dir },
+ my $exe= $exe_ndbd;
+ if ($exe_ndbmtd and ($exe_ndbmtd_counter++ % 2) == 0)
+ {
+ # Use ndbmtd every other time
+ $exe= $exe_ndbmtd;
+ }
my $path_ndbd_log= "$dir/ndbd.log";
my $proc= My::SafeProcess->new
(
name => $ndbd->after('cluster_config.'),
- path => $exe_ndbd,
+ path => $exe,
args => \$args,
output => $path_ndbd_log,
error => $path_ndbd_log,
append => 1,
verbose => $opt_verbose,
+ shutdown => sub { ndbd_stop($ndbd) },
);
mtr_verbose("Started $proc");
@@ -4255,8 +4244,10 @@ sub check_expected_crash_and_restart {
{
mtr_verbose("Crash was expected, file '$expect_file' exists");
- for (my $waits = 0; $waits < 50; $waits++)
+ for (my $waits = 0; $waits < 50; mtr_milli_sleep(100), $waits++)
{
+ # Race condition seen on Windows: try again until file not empty
+ next if -z $expect_file;
# If last line in expect file starts with "wait"
# sleep a little and try again, thus allowing the
# test script to control when the server should start
@@ -4265,10 +4256,11 @@ sub check_expected_crash_and_restart {
if ($last_line =~ /^wait/ )
{
mtr_verbose("Test says wait before restart") if $waits == 0;
- mtr_milli_sleep(100);
next;
}
+ # Ignore any partial or unknown command
+ next unless $last_line =~ /^restart/;
# If last line begins "restart:", the rest of the line is read as
# extra command line options to add to the restarted mysqld.
# Anything other than 'wait' or 'restart:' (with a colon) will
@@ -4652,6 +4644,8 @@ sub mysqld_start ($$) {
my @all_opts= @$extra_opts;
if (exists $mysqld->{'restart_opts'}) {
push (@all_opts, @{$mysqld->{'restart_opts'}});
+ mtr_verbose(My::Options::toStr("mysqld_start restart",
+ @{$mysqld->{'restart_opts'}}));
}
mysqld_arguments($args,$mysqld,\@all_opts);
diff --git a/mysql-test/r/client_xml.result b/mysql-test/r/client_xml.result
index aa4bdb2bd61..7f74a092af7 100644
--- a/mysql-test/r/client_xml.result
+++ b/mysql-test/r/client_xml.result
@@ -21,9 +21,9 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="test">
<table_structure name="t1">
- <field Field="a&amp;b" Type="int(11)" Null="YES" Key="" Extra="" />
- <field Field="a&lt;b" Type="int(11)" Null="YES" Key="" Extra="" />
- <field Field="a&gt;b" Type="text" Null="YES" Key="" Extra="" />
+ <field Field="a&amp;b" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
+ <field Field="a&lt;b" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
+ <field Field="a&gt;b" Type="text" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
<table_data name="t1">
<row>
diff --git a/mysql-test/r/ctype_many.result b/mysql-test/r/ctype_many.result
index 0b061f507a7..4ea5efab159 100644
--- a/mysql-test/r/ctype_many.result
+++ b/mysql-test/r/ctype_many.result
@@ -1684,6 +1684,21 @@ ARMENIAN CAPIT ECH 2
ARMENIAN CAPIT ZA 2
DROP TABLE t1;
#
+# Start of 5.1 tests
+#
+#
+# Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function
+#
+SET NAMES latin1;
+DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1)
+AS BINARY(0)) USING utf8);
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'Zpq'
+Warning 1292 Truncated incorrect BINARY(0) value: '1.'
+#
+# End of 5.1 tests
+#
+#
# Start of 5.5 tests
#
#
diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result
index 552ff564a89..39590eb1c99 100644
--- a/mysql-test/r/func_like.result
+++ b/mysql-test/r/func_like.result
@@ -182,4 +182,9 @@ INSERT INTO t2 VALUES (1), (2), (3);
SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
1
DROP TABLE t1, t2;
+#
+# Bug#59149 valgrind warnings with "like .. escape .." function
+#
+SELECT '' LIKE '1' ESCAPE COUNT(1);
+ERROR HY000: Incorrect arguments to ESCAPE
End of 5.1 tests
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result
index 31648aae7b0..3149a2a3344 100644
--- a/mysql-test/r/func_math.result
+++ b/mysql-test/r/func_math.result
@@ -641,3 +641,18 @@ INSERT INTO t1 (SELECT -pi());
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
DROP TABLE t1;
+#
+# Bug #59241 invalid memory read
+# in do_div_mod with doubly assigned variables
+#
+SELECT ((@a:=@b:=1.0) div (@b:=@a:=get_format(datetime, 'usa')));
+((@a:=@b:=1.0) div (@b:=@a:=get_format(datetime, 'usa')))
+NULL
+Warnings:
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+#
+# Bug #59498 div function broken in mysql-trunk
+#
+SELECT 1 div null;
+1 div null
+NULL
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 41fe9c096b0..81fe2413725 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -2615,6 +2615,22 @@ CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3))
1
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
+#
+# Bug#58165: "my_empty_string" gets modified and causes LOAD DATA to fail
+# and other crashes
+#
+CREATE TABLE t1 ( a TEXT );
+SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE 'bug58165.txt';
+SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' );
+insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' )
+x
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'b'
+LOAD DATA INFILE 'bug58165.txt' INTO TABLE t1;
+SELECT * FROM t1;
+a
+aaaaaaaaaaaaaa
+DROP TABLE t1;
End of 5.1 tests
Start of 5.4 tests
SELECT format(12345678901234567890.123, 3);
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index 47fe5d7338a..38f09d3b759 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -594,6 +594,7 @@ Index Tables To create or drop indexes
Insert Tables To insert data into tables
Lock tables Databases To use LOCK TABLES (together with SELECT privilege)
Process Server Admin To view the plain text of currently executing queries
+Proxy Server Admin To make proxy user possible
References Databases,Tables To have references on tables
Reload Server Admin To reload or refresh tables, logs and privileges
Replication client Server Admin To ask where the slave or master servers are
diff --git a/mysql-test/r/innodb_mysql_sync.result b/mysql-test/r/innodb_mysql_sync.result
index d0ba7b0f2e9..58948835f66 100644
--- a/mysql-test/r/innodb_mysql_sync.result
+++ b/mysql-test/r/innodb_mysql_sync.result
@@ -90,3 +90,68 @@ test.t1 optimize status Operation failed
# Connection default
DROP TABLE t1;
SET DEBUG_SYNC= 'RESET';
+#
+# Bug#42230 during add index, cannot do queries on storage engines
+# that implement add_index
+#
+DROP DATABASE IF EXISTS db1;
+DROP TABLE IF EXISTS t1;
+# Test 1: Secondary index, should not block reads (original test case).
+# Connection default
+CREATE DATABASE db1;
+CREATE TABLE db1.t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, value INT) engine=innodb;
+INSERT INTO db1.t1(value) VALUES (1), (2);
+SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+# Sending:
+ALTER TABLE db1.t1 ADD INDEX(value);
+# Connection con1
+SET DEBUG_SYNC= "now WAIT_FOR manage";
+USE db1;
+SELECT * FROM t1;
+id value
+1 1
+2 2
+SET DEBUG_SYNC= "now SIGNAL query";
+# Connection default
+# Reaping: ALTER TABLE db1.t1 ADD INDEX(value)
+DROP DATABASE db1;
+# Test 2: Primary index (implicit), should block reads.
+CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
+SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+# Sending:
+ALTER TABLE t1 ADD UNIQUE INDEX(a);
+# Connection con1
+SET DEBUG_SYNC= "now WAIT_FOR manage";
+USE test;
+# Sending:
+SELECT * FROM t1;
+# Connection con2
+# Waiting for SELECT to be blocked by the metadata lock on t1
+SET DEBUG_SYNC= "now SIGNAL query";
+# Connection default
+# Reaping: ALTER TABLE t1 ADD UNIQUE INDEX(a)
+# Connection con1
+# Reaping: SELECT * FROM t1
+a b
+# Test 3: Primary index (explicit), should block reads.
+# Connection default
+ALTER TABLE t1 DROP INDEX a;
+SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+# Sending:
+ALTER TABLE t1 ADD PRIMARY KEY (a);
+# Connection con1
+SET DEBUG_SYNC= "now WAIT_FOR manage";
+# Sending:
+SELECT * FROM t1;
+# Connection con2
+# Waiting for SELECT to be blocked by the metadata lock on t1
+SET DEBUG_SYNC= "now SIGNAL query";
+# Connection default
+# Reaping: ALTER TABLE t1 ADD PRIMARY KEY (a)
+# Connection con1
+# Reaping: SELECT * FROM t1
+a b
+# Test 4: Secondary unique index, should not block reads.
+# Connection default
+SET DEBUG_SYNC= "RESET";
+DROP TABLE t1;
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index 99ca9f05535..ecd53003513 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -1432,4 +1432,74 @@ WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL
GROUP BY t2.f1, t2.f2;
f1 f1 f2
DROP TABLE t1,t2;
+#
+# Bug#57034 incorrect OUTER JOIN result when joined on unique key
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY,
+col_int INT,
+col_int_unique INT UNIQUE KEY);
+INSERT INTO t1 VALUES (1,NULL,2), (2,0,0);
+CREATE TABLE t2 (pk INT PRIMARY KEY,
+col_int INT,
+col_int_unique INT UNIQUE KEY);
+INSERT INTO t2 VALUES (1,0,1), (2,0,2);
+EXPLAIN
+SELECT * FROM t1 LEFT JOIN t2
+ON t1.col_int_unique = t2.col_int_unique AND t1.col_int = t2.col_int
+WHERE t1.pk=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
+1 SIMPLE t2 const col_int_unique col_int_unique 5 const 1
+SELECT * FROM t1 LEFT JOIN t2
+ON t1.col_int_unique = t2.col_int_unique AND t1.col_int = t2.col_int
+WHERE t1.pk=1;
+pk col_int col_int_unique pk col_int col_int_unique
+1 NULL 2 NULL NULL NULL
+DROP TABLE t1,t2;
+#
+# Bug#48046 Server incorrectly processing JOINs on NULL values
+#
+CREATE TABLE `BB` (
+`pk` int(11) NOT NULL AUTO_INCREMENT,
+`time_key` time DEFAULT NULL,
+`varchar_key` varchar(1) DEFAULT NULL,
+`varchar_nokey` varchar(1) DEFAULT NULL,
+PRIMARY KEY (`pk`),
+KEY `time_key` (`time_key`),
+KEY `varchar_key` (`varchar_key`)
+) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
+INSERT INTO `BB` VALUES (10,'18:27:58',NULL,NULL);
+SELECT table1.time_key AS field1, table2.pk
+FROM BB table1 LEFT JOIN BB table2
+ON table2.varchar_nokey = table1.varchar_key
+HAVING field1;
+field1 pk
+18:27:58 NULL
+DROP TABLE BB;
+#
+# Bug#49600 Server incorrectly processing RIGHT JOIN with
+# constant WHERE clause and no index
+#
+CREATE TABLE `BB` (
+`col_datetime_key` datetime DEFAULT NULL,
+`col_varchar_key` varchar(1) DEFAULT NULL,
+`col_varchar_nokey` varchar(1) DEFAULT NULL,
+KEY `col_datetime_key` (`col_datetime_key`),
+KEY `col_varchar_key` (`col_varchar_key`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+INSERT INTO `BB` VALUES ('1900-01-01 00:00:00',NULL,NULL);
+SELECT table1.col_datetime_key
+FROM BB table1 RIGHT JOIN BB table2
+ON table2 .col_varchar_nokey = table1.col_varchar_key
+WHERE 7;
+col_datetime_key
+NULL
+ALTER TABLE BB DISABLE KEYS;
+SELECT table1.col_datetime_key
+FROM BB table1 RIGHT JOIN BB table2
+ON table2 .col_varchar_nokey = table1.col_varchar_key
+WHERE 7;
+col_datetime_key
+NULL
+DROP TABLE BB;
End of 5.1 tests
diff --git a/mysql-test/r/mysqladmin.result b/mysql-test/r/mysqladmin.result
index 57927f8aa67..748152bffcc 100644
--- a/mysql-test/r/mysqladmin.result
+++ b/mysql-test/r/mysqladmin.result
@@ -2,3 +2,11 @@ mysqld is alive
mysqladmin: unknown variable 'database=db1'
Warning: mysqladmin: unknown variable 'loose-database=db2'
mysqld is alive
+#
+# Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
+#
+# Executing mysqladmin with --sleep=1 and --count=2.
+# Done.
+# Displaying the output :
+mysqld is alive
+mysqld is alive
diff --git a/mysql-test/r/mysqlbinlog_row_big.result b/mysql-test/r/mysqlbinlog_row_big.result
index 46fa0dc79cd..0bdbfdcee3a 100644
--- a/mysql-test/r/mysqlbinlog_row_big.result
+++ b/mysql-test/r/mysqlbinlog_row_big.result
@@ -36,8 +36,8 @@ c1 LONGTEXT
#
# Insert some big rows.
#
-256MB
-INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 16777216));
+64MB
+INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 4194304));
affected rows: 1
32MB
INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 2097152));
@@ -53,7 +53,7 @@ affected rows: 1
# Do not display the column value itself, just its length.
#
SELECT LENGTH(c1) FROM t1;
-LENGTH(c1) 268435456
+LENGTH(c1) 67108864
LENGTH(c1) 33554432
LENGTH(c1) 4194304
LENGTH(c1) 524288
@@ -69,7 +69,7 @@ info: Rows matched: 4 Changed: 4 Warnings: 0
# Do not display the column value itself, just its length.
#
SELECT LENGTH(c1) FROM t1;
-LENGTH(c1) 536870912
+LENGTH(c1) 134217728
LENGTH(c1) 1048576
LENGTH(c1) 67108864
LENGTH(c1) 8388608
diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result
index 60ba06c8f7e..6659a291e0b 100644
--- a/mysql-test/r/mysqld--help-notwin.result
+++ b/mysql-test/r/mysqld--help-notwin.result
@@ -20,6 +20,7 @@ The following options may be given as the first argument:
Offset added to Auto-increment columns. Used when
auto-increment-increment != 1
--autocommit Set default value for autocommit (0 or 1)
+ (Defaults to on; use --skip-autocommit to disable.)
--automatic-sp-privileges
Creating and dropping stored procedures alters ACLs
(Defaults to on; use --skip-automatic-sp-privileges to disable.)
@@ -732,6 +733,7 @@ abort-slave-event-count 0
allow-suspicious-udfs FALSE
auto-increment-increment 1
auto-increment-offset 1
+autocommit TRUE
automatic-sp-privileges TRUE
back-log 50
big-tables FALSE
diff --git a/mysql-test/r/mysqld--help-win.result b/mysql-test/r/mysqld--help-win.result
index dfb53937245..240c29294e2 100644
--- a/mysql-test/r/mysqld--help-win.result
+++ b/mysql-test/r/mysqld--help-win.result
@@ -20,6 +20,7 @@ The following options may be given as the first argument:
Offset added to Auto-increment columns. Used when
auto-increment-increment != 1
--autocommit Set default value for autocommit (0 or 1)
+ (Defaults to on; use --skip-autocommit to disable.)
--automatic-sp-privileges
Creating and dropping stored procedures alters ACLs
(Defaults to on; use --skip-automatic-sp-privileges to disable.)
@@ -736,6 +737,7 @@ abort-slave-event-count 0
allow-suspicious-udfs FALSE
auto-increment-increment 1
auto-increment-offset 1
+autocommit TRUE
automatic-sp-privileges TRUE
back-log 50
big-tables FALSE
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index 892501f2b28..dd3ea5e9716 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -14,7 +14,7 @@ INSERT INTO t1 VALUES (1), (2);
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="test">
<table_structure name="t1">
- <field Field="a" Type="int(11)" Null="YES" Key="MUL" Extra="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="MUL" Extra="" Comment="" />
<key Table="t1" Non_unique="1" Key_name="a" Seq_in_index="1" Column_name="a" Collation="A" Null="YES" Index_type="BTREE" Comment="" Index_comment="" />
</table_structure>
<table_data name="t1">
@@ -150,9 +150,9 @@ INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="test">
<table_structure name="t1">
- <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
- <field Field="b" Type="text" Null="YES" Key="" Extra="" />
- <field Field="c" Type="varchar(3)" Null="YES" Key="" Extra="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
+ <field Field="b" Type="text" Null="YES" Key="" Extra="" Comment="" />
+ <field Field="c" Type="varchar(3)" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
<table_data name="t1">
<row>
@@ -178,7 +178,7 @@ INSERT INTO t1 VALUES ("1\""), ("\"2");
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="test">
<table_structure name="t1">
- <field Field="a&quot;b&quot;" Type="char(2)" Null="YES" Key="" Extra="" />
+ <field Field="a&quot;b&quot;" Type="char(2)" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
<table_data name="t1">
<row>
@@ -1612,10 +1612,10 @@ CREATE TABLE `t2` (
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="mysqldump_test_db">
<table_structure name="t1">
- <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
<table_structure name="t2">
- <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
</database>
</mysqldump>
@@ -1623,10 +1623,10 @@ CREATE TABLE `t2` (
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="mysqldump_test_db">
<table_structure name="t1">
- <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
<table_structure name="t2">
- <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
</database>
</mysqldump>
@@ -3644,8 +3644,8 @@ INSERT INTO t1 VALUES(1,0xff00fef0);
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="test">
<table_structure name="t1">
- <field Field="f1" Type="int(10)" Null="YES" Key="" Extra="" />
- <field Field="data" Type="mediumblob" Null="YES" Key="" Extra="" />
+ <field Field="f1" Type="int(10)" Null="YES" Key="" Extra="" Comment="" />
+ <field Field="data" Type="mediumblob" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
<table_data name="t1">
<row>
@@ -4576,5 +4576,20 @@ LENGTH(a)
800
DROP TABLE t1, t2;
#
+# Bug #13618 : mysqldump --xml ommit comment on table field
+#
+CREATE TABLE `comment_table` (i INT COMMENT 'FIELD COMMENT') COMMENT = 'TABLE COMMENT';
+<?xml version="1.0"?>
+<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<database name="test">
+ <table_structure name="comment_table">
+ <field Field="i" Type="int(11)" Null="YES" Key="" Extra="" Comment="FIELD COMMENT" />
+ </table_structure>
+ <table_data name="comment_table">
+ </table_data>
+</database>
+</mysqldump>
+DROP TABLE `comment_table`;
+#
# End of 5.1 tests
#
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
index c3b6d22ef38..9c8f49c333b 100644
--- a/mysql-test/r/mysqltest.result
+++ b/mysql-test/r/mysqltest.result
@@ -311,12 +311,33 @@ failing query in let
create table t1 (a varchar(100));
insert into t1 values ('`select 42`');
`select 42`
+insert into t1 values ('$dollar');
+$dollar
+`select 42`
drop table t1;
mysqltest: At line 1: Error running query 'failing query': 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing query' at line 1
mysqltest: At line 1: Missing required argument 'filename' to command 'source'
mysqltest: At line 1: Could not open './non_existingFile' for reading, errno: 2
-mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep
-mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": At line 1: query 'garbage ' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
+mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql":
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+At line 1: Source directives are nesting too deep
+mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql":
+included from MYSQLTEST_VARDIR/tmp/error.sql at line 1:
+At line 1: query 'garbage ' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
2 = outer loop variable after while
here is the sourced script
@@ -444,7 +465,9 @@ counter is 6
counter is 7
1
Testing while with not
-mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply
+mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc":
+included from MYSQLTEST_VARDIR/tmp/mysqltest_while.inc at line 65:
+At line 64: Nesting too deeply
mysqltest: At line 1: missing '(' in while
mysqltest: At line 1: missing ')' in while
mysqltest: At line 1: Missing '{' after while. Found "dec $i"
@@ -493,8 +516,12 @@ mysqltest: At line 1: query 'connect con2,localhost,root,,illegal_db' failed: 1
mysqltest: At line 1: Illegal argument for port: 'illegal_port'
mysqltest: At line 1: Illegal option to connect: SMTP
200 connects succeeded
-mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool
-mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists
+mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql":
+included from MYSQLTEST_VARDIR/tmp/mysqltest.sql at line 3:
+At line 3: connection 'test_con1' not found in connection pool
+mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql":
+included from MYSQLTEST_VARDIR/tmp/mysqltest.sql at line 2:
+At line 2: Connection test_con1 already exists
show tables;
ERROR 3D000: No database selected
connect con1,localhost,root,,;
diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result
index 1dcb2fdebb8..87eafb234a8 100644
--- a/mysql-test/r/partition_error.result
+++ b/mysql-test/r/partition_error.result
@@ -1,5 +1,18 @@
drop table if exists t1, t2;
#
+# Bug#57924: crash when creating partitioned table with
+# multiple columns in the partition key
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, a);
+ERROR HY000: Duplicate partition field name 'a'
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(A, b);
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, A);
+ERROR HY000: Duplicate partition field name 'a'
+#
# Bug#54483: valgrind errors when making warnings for multiline inserts
# into partition
#
diff --git a/mysql-test/r/plugin_auth.result b/mysql-test/r/plugin_auth.result
index b155b296ac1..fa6908530b7 100644
--- a/mysql-test/r/plugin_auth.result
+++ b/mysql-test/r/plugin_auth.result
@@ -319,7 +319,7 @@ Proxied_user
With_grant 1
FLUSH PRIVILEGES;
#
-# Bug#58139 : default-auth option not recognized in MySQL standardi
+# Bug#58139 : default-auth option not recognized in MySQL standard
# command line clients
#
# Executing 'mysql'
@@ -328,4 +328,6 @@ FLUSH PRIVILEGES;
# Executing 'mysqladmin'
mysqld is alive
# Executing 'mysqldump'
+# Executing 'mysql_upgrade'
+The --upgrade-system-tables option was used, databases won't be touched.
End of 5.5 tests
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index a345a2ae6aa..af0ef29bb53 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -4867,6 +4867,70 @@ SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
1
1
DROP TABLE t1;
+#
+# Bug #58422: Incorrect result when OUTER JOIN'ing
+# with an empty table
+#
+CREATE TABLE t_empty(pk INT PRIMARY KEY, i INT) ENGINE = MYISAM;
+CREATE TABLE t1(pk INT PRIMARY KEY, i INT) ENGINE = MYISAM;
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+CREATE TABLE t2(pk INT PRIMARY KEY, i INT) ENGINE = MYISAM;
+INSERT INTO t2 VALUES (1,1), (2,2), (3,3);
+EXPLAIN
+SELECT *
+FROM
+t1
+LEFT OUTER JOIN
+(t2 INNER JOIN t_empty ON TRUE)
+ON t1.pk=t2.pk
+WHERE t2.pk <> 2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+SELECT *
+FROM
+t1
+LEFT OUTER JOIN
+(t2 INNER JOIN t_empty ON TRUE)
+ON t1.pk=t2.pk
+WHERE t2.pk <> 2;
+pk i pk i pk i
+EXPLAIN
+SELECT *
+FROM
+t1
+LEFT OUTER JOIN
+(t2 CROSS JOIN t_empty)
+ON t1.pk=t2.pk
+WHERE t2.pk <> 2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+SELECT *
+FROM
+t1
+LEFT OUTER JOIN
+(t2 CROSS JOIN t_empty)
+ON t1.pk=t2.pk
+WHERE t2.pk <> 2;
+pk i pk i pk i
+EXPLAIN
+SELECT *
+FROM
+t1
+LEFT OUTER JOIN
+(t2 INNER JOIN t_empty ON t_empty.i=t2.i)
+ON t1.pk=t2.pk
+WHERE t2.pk <> 2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+SELECT *
+FROM
+t1
+LEFT OUTER JOIN
+(t2 INNER JOIN t_empty ON t_empty.i=t2.i)
+ON t1.pk=t2.pk
+WHERE t2.pk <> 2;
+pk i pk i pk i
+DROP TABLE t1,t2,t_empty;
End of 5.1 tests
#
# Bug#54515: Crash in opt_range.cc::get_best_group_min_max on
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index d42cb680112..feeba25c536 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -1325,6 +1325,17 @@ Tables_in_test Table_type
été BASE TABLE
drop table `été`;
set names latin1;
+#
+# Bug#4374 SHOW TABLE STATUS FROM ignores collation_connection
+# Character set: Latin-1 (ISO-8859-1)
+#
+SET NAMES latin1;
+CREATE DATABASE `ä`;
+CREATE TABLE `ä`.`ä` (a int) ENGINE=Memory;
+SHOW TABLE STATUS FROM `ä` LIKE 'ä';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+ä MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
+DROP DATABASE `ä`;
show columns from `#mysql50#????????`;
Got one of the listed errors
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result
index 958285d6a23..7d7acb3d8ac 100644
--- a/mysql-test/r/type_datetime.result
+++ b/mysql-test/r/type_datetime.result
@@ -637,6 +637,17 @@ CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime) AS DECIMAL(30,7))
20080729104251.1234560
Warnings:
Warning 1292 Truncated incorrect datetime value: '2008-07-29T10:42:51.1234567'
+#
+# Bug#59173: Failure to handle DATE(TIME) values where Year, Month or
+# Day is ZERO
+#
+CREATE TABLE t1 (dt1 DATETIME);
+INSERT INTO t1 (dt1) VALUES ('0000-00-01 00:00:01');
+DELETE FROM t1 WHERE dt1 = '0000-00-01 00:00:01';
+# Should be empty
+SELECT * FROM t1;
+dt1
+DROP TABLE t1;
End of 5.1 tests
#
# Start of 5.5 tests
diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result
index 6b7ba57ce2e..4568775d3fd 100644
--- a/mysql-test/r/xml.result
+++ b/mysql-test/r/xml.result
@@ -1113,6 +1113,17 @@ SELECT UPDATEXML(NULL, (LPAD(0.1111E-15, '2011', 1)), 1);
ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing
SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1));
ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing
+#
+# Bug #44332 my_xml_scan reads behind the end of buffer
+#
+SELECT UPDATEXML(CONVERT(_latin1'<' USING utf8),'1','1');
+UPDATEXML(CONVERT(_latin1'<' USING utf8),'1','1')
+NULL
+Warnings:
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 2: END-OF-INPUT unexpected (ident or '/' wanted)'
+SELECT UPDATEXML(CONVERT(_latin1'<!--' USING utf8),'1','1');
+UPDATEXML(CONVERT(_latin1'<!--' USING utf8),'1','1')
+NULL
End of 5.1 tests
#
# Start of 5.5 tests
diff --git a/mysql-test/suite/bugs/t/bug57108.test b/mysql-test/suite/bugs/t/bug57108.test
index 1006a7b30f1..56acd7fe7bd 100644
--- a/mysql-test/suite/bugs/t/bug57108.test
+++ b/mysql-test/suite/bugs/t/bug57108.test
@@ -5,7 +5,7 @@
# switched directory after starting the server and am using a relative
# --defaults-file.
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
+eval INSTALL PLUGIN example SONAME '$EXAMPLE_PLUGIN';
--query_vertical SELECT @@global.connect_timeout AS connect_timeout, @@global.local_infile AS local_infile
diff --git a/mysql-test/suite/perfschema/r/server_init.result b/mysql-test/suite/perfschema/r/server_init.result
index b6f1d4828c3..26104197686 100644
--- a/mysql-test/suite/perfschema/r/server_init.result
+++ b/mysql-test/suite/perfschema/r/server_init.result
@@ -31,10 +31,6 @@ select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_charset";
count(name)
1
-select count(name) from mutex_instances
-where name like "wait/synch/mutex/mysys/THR_LOCK_time";
-count(name)
-1
select count(name) from cond_instances
where name like "wait/synch/cond/mysys/THR_COND_threads";
count(name)
diff --git a/mysql-test/suite/perfschema/t/server_init.test b/mysql-test/suite/perfschema/t/server_init.test
index 33eeeb7edb2..95d8be0e864 100644
--- a/mysql-test/suite/perfschema/t/server_init.test
+++ b/mysql-test/suite/perfschema/t/server_init.test
@@ -52,9 +52,6 @@ select count(name) from mutex_instances
select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_charset";
-select count(name) from mutex_instances
- where name like "wait/synch/mutex/mysys/THR_LOCK_time";
-
# There are no global rwlock in mysys
# Verify that these global conditions have been properly initilized in mysys
diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
index ccef60d6323..ef901476784 100644
--- a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
@@ -16,7 +16,7 @@ RESET SLAVE;
*** Reset slave affect ***
SET @@global.slave_net_timeout=30;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=5;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=5;
RESET SLAVE;
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
Variable_name Value
@@ -24,7 +24,7 @@ Slave_heartbeat_period 15.000
*** Default value if slave_net_timeout changed ***
SET @@global.slave_net_timeout=50;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root';
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20;
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
Variable_name Value
Slave_heartbeat_period 25.000
@@ -39,14 +39,14 @@ SET @@global.slave_net_timeout=@restore_slave_net_timeout;
RESET SLAVE;
*** Warning if updated slave_heartbeat_timeout > slave_net_timeout ***
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=SLAVE_NET_TIMEOUT;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=SLAVE_NET_TIMEOUT;
Warnings:
Warning 1704 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.
RESET SLAVE;
*** CHANGE MASTER statement only updates slave_heartbeat_period ***
SET @@global.slave_net_timeout=20;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=5;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=5;
SHOW VARIABLES LIKE 'slave_net_timeout';
Variable_name Value
slave_net_timeout 20
@@ -67,7 +67,7 @@ RESET SLAVE;
SET @@global.slave_net_timeout=500;
SET @@global.slave_net_timeout=200;
RESET SLAVE;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root';
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20;
include/start_slave.inc
SHOW VARIABLES LIKE 'slave_net_timeout';
Variable_name Value
@@ -82,7 +82,7 @@ SET @@global.slave_net_timeout=@restore_slave_net_timeout;
*** Start/stop slave ***
SET @@global.slave_net_timeout=100;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=20;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=20;
include/start_slave.inc
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
Variable_name Value
@@ -94,7 +94,7 @@ Slave_heartbeat_period 20.000
*** Reload slave ***
SET @@global.slave_net_timeout=50;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=30;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=30;
include/rpl_restart_server.inc [server_number=2]
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
Variable_name Value
@@ -102,7 +102,7 @@ Slave_heartbeat_period 30.000
SET @restore_slave_net_timeout=@@global.slave_net_timeout;
*** Disable heartbeat ***
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0;
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
Variable_name Value
Slave_heartbeat_period 0.000
@@ -129,12 +129,12 @@ Result
0
*** Min slave_heartbeat_timeout ***
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.001;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.001;
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
Variable_name Value
Slave_heartbeat_period 0.001
RESET SLAVE;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.0009;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.0009;
Warnings:
Warning 1703 The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled.
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
@@ -143,36 +143,36 @@ Slave_heartbeat_period 0.000
RESET SLAVE;
*** Max slave_heartbeat_timeout ***
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=4294967;
Warnings:
Warning 1704 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
Variable_name Value
Slave_heartbeat_period 4294967.000
RESET SLAVE;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294968;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=4294968;
ERROR HY000: The requested value for the heartbeat period is either negative or exceeds the maximum allowed (4294967 seconds).
RESET SLAVE;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=8589935;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=8589935;
ERROR HY000: The requested value for the heartbeat period is either negative or exceeds the maximum allowed (4294967 seconds).
RESET SLAVE;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967296;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=4294967296;
ERROR HY000: The requested value for the heartbeat period is either negative or exceeds the maximum allowed (4294967 seconds).
RESET SLAVE;
*** Misc incorrect values ***
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD='-1';
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD='-1';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''-1'' at line 1
RESET SLAVE;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD='123abc';
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD='123abc';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''123abc'' at line 1
RESET SLAVE;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD='';
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD='';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''' at line 1
RESET SLAVE;
*** Running slave ***
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.1;
include/start_slave.inc
Heartbeat event received
@@ -218,7 +218,7 @@ BEGIN
UPDATE test.t1 SET a = a + 1 WHERE a < 10;
END|
RESET SLAVE;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=5;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=5;
include/start_slave.inc
SET @@global.event_scheduler=1;
Number of received heartbeat events: 0
@@ -231,7 +231,7 @@ RESET SLAVE;
DROP TABLE t1;
DROP TABLE t1;
RESET MASTER;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.5;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.5;
include/start_slave.inc
Heartbeat events are received while rotation of relay logs (1 means 'yes'): 1
@@ -240,7 +240,7 @@ SET @@global.slave_compressed_protocol=1;
include/stop_slave.inc
RESET SLAVE;
SET @@global.slave_compressed_protocol=1;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.1;
include/start_slave.inc
Heartbeat event received
SET @@global.slave_compressed_protocol=0;
@@ -249,7 +249,7 @@ SET @@global.slave_compressed_protocol=0;
*** Reset master ***
STOP SLAVE;
RESET SLAVE;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.1;
include/start_slave.inc
RESET MASTER;
Heartbeat events are received after reset of master (1 means 'yes'): 1
@@ -257,7 +257,7 @@ Heartbeat events are received after reset of master (1 means 'yes'): 1
*** Reload master ***
STOP SLAVE;
RESET SLAVE;
-CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_CONNECT_RETRY = 5;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=0.1;
include/start_slave.inc
Heartbeat event received
include/rpl_restart_server.inc [server_number=1]
diff --git a/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result b/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result
index 71d1ca9a928..7c55e44ed59 100644
--- a/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result
+++ b/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result
@@ -1,14 +1,12 @@
include/master-slave.inc
[connection master]
+include/rpl_reset.inc
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
-INSERT INTO t1 VALUES (4);
-INSERT INTO t1 VALUES (5);
-INSERT INTO t1 VALUES (6);
-[MASTER] ********* SOW BINLOG EVENTS IN ... *********
-show binlog events from <binlog_start>;
+******** [master] SHOW BINLOG EVENTS IN <FILE> ********
+show binlog events in 'master-bin.000001' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 # Query # # BEGIN
@@ -23,19 +21,17 @@ master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
+******** [master] SHOW BINLOG EVENTS IN <FILE> LIMIT 1 ********
+show binlog events in 'master-bin.000001' from <binlog_start> limit 1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
+******** [master] SHOW BINLOG EVENTS IN <FILE> LIMIT 1,3 ********
+show binlog events in 'master-bin.000001' from <binlog_start> limit 1,3;
+Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # COMMIT
-[MASTER] ********* SOW BINLOG EVENTS *********
+******** [master] SHOW BINLOG EVENTS ********
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
@@ -51,33 +47,8 @@ master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # COMMIT
-[MASTER] ********* SOW BINLOG EVENTS ... LIMIT rows *********
-show binlog events from <binlog_start> limit 3;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t1)
-[MASTER] ********* SOW BINLOG EVENTS ... LIMIT offset,rows *********
-show binlog events from <binlog_start> limit 1,4;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # COMMIT
-[SLAVE] ********* SOW BINLOG EVENTS IN ... *********
-show binlog events from <binlog_start>;
+******** [slave] SHOW BINLOG EVENTS IN <FILE> ********
+show binlog events in 'slave-bin.000001' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
slave-bin.000001 # Query # # BEGIN
@@ -92,19 +63,17 @@ slave-bin.000001 # Query # # BEGIN
slave-bin.000001 # Table_map # # table_id: # (test.t1)
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
slave-bin.000001 # Query # # COMMIT
+******** [slave] SHOW BINLOG EVENTS IN <FILE> LIMIT 1 ********
+show binlog events in 'slave-bin.000001' from <binlog_start> limit 1;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
+******** [slave] SHOW BINLOG EVENTS IN <FILE> LIMIT 1,3 ********
+show binlog events in 'slave-bin.000001' from <binlog_start> limit 1,3;
+Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Query # # BEGIN
slave-bin.000001 # Table_map # # table_id: # (test.t1)
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Table_map # # table_id: # (test.t1)
-slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Table_map # # table_id: # (test.t1)
-slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query # # COMMIT
-[SLAVE] ********* SOW BINLOG EVENTS *********
+******** [slave] SHOW BINLOG EVENTS ********
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
@@ -120,85 +89,53 @@ slave-bin.000001 # Query # # BEGIN
slave-bin.000001 # Table_map # # table_id: # (test.t1)
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Table_map # # table_id: # (test.t1)
-slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Table_map # # table_id: # (test.t1)
-slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Table_map # # table_id: # (test.t1)
-slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query # # COMMIT
-[SLAVE] ********* SOW BINLOG EVENTS ... LIMIT rows *********
-show binlog events from <binlog_start> limit 3;
+******** [slave] SHOW RELAYLOG EVENTS IN <FILE> ********
+show relaylog events in 'slave-relay-bin.000003' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Table_map # # table_id: # (test.t1)
-[SLAVE] ********* SOW BINLOG EVENTS ... LIMIT offset,rows *********
-show binlog events from <binlog_start> limit 1,4;
+slave-relay-bin.000003 # Rotate # # master-bin.000001;pos=4
+slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT)
+slave-relay-bin.000003 # Query # # BEGIN
+slave-relay-bin.000003 # Table_map # # table_id: # (test.t1)
+slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F
+slave-relay-bin.000003 # Query # # COMMIT
+slave-relay-bin.000003 # Query # # BEGIN
+slave-relay-bin.000003 # Table_map # # table_id: # (test.t1)
+slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F
+slave-relay-bin.000003 # Query # # COMMIT
+slave-relay-bin.000003 # Query # # BEGIN
+slave-relay-bin.000003 # Table_map # # table_id: # (test.t1)
+slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F
+slave-relay-bin.000003 # Query # # COMMIT
+******** [slave] SHOW RELAYLOG EVENTS IN <FILE> LIMIT 1 ********
+show relaylog events in 'slave-relay-bin.000003' from <binlog_start> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Table_map # # table_id: # (test.t1)
-slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query # # COMMIT
-[SLAVE] ********* SOW RELAYLOG EVENTS IN ... *********
-show relaylog events in 'slave-relay-bin.000002' from <binlog_start>;
+slave-relay-bin.000003 # Rotate # # master-bin.000001;pos=4
+******** [slave] SHOW RELAYLOG EVENTS IN <FILE> LIMIT 1,3 ********
+show relaylog events in 'slave-relay-bin.000003' from <binlog_start> limit 1,3;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=4
-slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
-slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT)
-slave-relay-bin.000002 # Query # # BEGIN
-slave-relay-bin.000002 # Table_map # # table_id: # (test.t1)
-slave-relay-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
-slave-relay-bin.000002 # Query # # COMMIT
-slave-relay-bin.000002 # Query # # BEGIN
-slave-relay-bin.000002 # Table_map # # table_id: # (test.t1)
-slave-relay-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
-slave-relay-bin.000002 # Query # # COMMIT
-slave-relay-bin.000002 # Query # # BEGIN
-slave-relay-bin.000002 # Table_map # # table_id: # (test.t1)
-slave-relay-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
-slave-relay-bin.000002 # Query # # COMMIT
-slave-relay-bin.000002 # Query # # BEGIN
-slave-relay-bin.000002 # Table_map # # table_id: # (test.t1)
-slave-relay-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
-slave-relay-bin.000002 # Query # # COMMIT
-slave-relay-bin.000002 # Query # # BEGIN
-slave-relay-bin.000002 # Table_map # # table_id: # (test.t1)
-slave-relay-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
-slave-relay-bin.000002 # Query # # COMMIT
-slave-relay-bin.000002 # Query # # BEGIN
-slave-relay-bin.000002 # Table_map # # table_id: # (test.t1)
-slave-relay-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
-slave-relay-bin.000002 # Query # # COMMIT
-[SLAVE] ********* SOW RELAYLOG EVENTS *********
+slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT)
+slave-relay-bin.000003 # Query # # BEGIN
+******** [slave] SHOW RELAYLOG EVENTS ********
show relaylog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-relay-bin.000001 # Rotate # # slave-relay-bin.000002;pos=4
-[MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT rows *********
-show relaylog events in 'slave-relay-bin.000002' from <binlog_start> limit 3;
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=4
-slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
-slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT)
-[MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT offset,rows *********
-show relaylog events in 'slave-relay-bin.000002' from <binlog_start> limit 1,3;
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
-slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT)
-slave-relay-bin.000002 # Query # # BEGIN
+slave-relay-bin.000002 # Rotate # # slave-relay-bin.000003;pos=4
FLUSH LOGS;
FLUSH LOGS;
DROP TABLE t1;
-[MASTER] ********* SOW BINLOG EVENTS IN ... *********
+******** [master] SHOW BINLOG EVENTS IN <FILE> ********
show binlog events in 'master-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
-[MASTER] ********* SOW BINLOG EVENTS *********
+******** [master] SHOW BINLOG EVENTS IN <FILE> LIMIT 1 ********
+show binlog events in 'master-bin.000002' from <binlog_start> limit 1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
+******** [master] SHOW BINLOG EVENTS IN <FILE> LIMIT 1,3 ********
+show binlog events in 'master-bin.000002' from <binlog_start> limit 1,3;
+Log_name Pos Event_type Server_id End_log_pos Info
+******** [master] SHOW BINLOG EVENTS ********
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
@@ -214,24 +151,19 @@ master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # COMMIT
master-bin.000001 # Rotate # # master-bin.000002;pos=4
-[SLAVE] ********* SOW BINLOG EVENTS IN ... *********
+******** [slave] SHOW BINLOG EVENTS IN <FILE> ********
show binlog events in 'slave-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
-[SLAVE] ********* SOW BINLOG EVENTS *********
+******** [slave] SHOW BINLOG EVENTS IN <FILE> LIMIT 1 ********
+show binlog events in 'slave-bin.000002' from <binlog_start> limit 1;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
+******** [slave] SHOW BINLOG EVENTS IN <FILE> LIMIT 1,3 ********
+show binlog events in 'slave-bin.000002' from <binlog_start> limit 1,3;
+Log_name Pos Event_type Server_id End_log_pos Info
+******** [slave] SHOW BINLOG EVENTS ********
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
@@ -247,27 +179,25 @@ slave-bin.000001 # Query # # BEGIN
slave-bin.000001 # Table_map # # table_id: # (test.t1)
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Table_map # # table_id: # (test.t1)
-slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Table_map # # table_id: # (test.t1)
-slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Table_map # # table_id: # (test.t1)
-slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query # # COMMIT
slave-bin.000001 # Rotate # # slave-bin.000002;pos=4
-[SLAVE] ********* SOW RELAYLOG EVENTS IN ... *********
-show relaylog events from <binlog_start>;
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-relay-bin.000004 # Rotate # # master-bin.000002;pos=4
-slave-relay-bin.000004 # Rotate # # slave-relay-bin.000005;pos=4
-[SLAVE] ********* SOW RELAYLOG EVENTS *********
+******** [slave] SHOW RELAYLOG EVENTS IN <FILE> ********
+show relaylog events in 'slave-relay-bin.000006' from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-relay-bin.000006 # Rotate # # master-bin.000002;pos=4
+slave-relay-bin.000006 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+slave-relay-bin.000006 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
+******** [slave] SHOW RELAYLOG EVENTS IN <FILE> LIMIT 1 ********
+show relaylog events in 'slave-relay-bin.000006' from <binlog_start> limit 1;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-relay-bin.000006 # Rotate # # master-bin.000002;pos=4
+******** [slave] SHOW RELAYLOG EVENTS IN <FILE> LIMIT 1,3 ********
+show relaylog events in 'slave-relay-bin.000006' from <binlog_start> limit 1,3;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-relay-bin.000006 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+slave-relay-bin.000006 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
+******** [slave] SHOW RELAYLOG EVENTS ********
show relaylog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-relay-bin.000004 # Rotate # # master-bin.000002;pos=4
-slave-relay-bin.000004 # Rotate # # slave-relay-bin.000005;pos=4
+slave-relay-bin.000005 # Rotate # # master-bin.000002;pos=4
+slave-relay-bin.000005 # Rotate # # slave-relay-bin.000006;pos=4
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result b/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result
index 0e34c0dfb19..f706fa0fe75 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result
@@ -1,14 +1,12 @@
include/master-slave.inc
[connection master]
+include/rpl_reset.inc
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
-INSERT INTO t1 VALUES (4);
-INSERT INTO t1 VALUES (5);
-INSERT INTO t1 VALUES (6);
-[MASTER] ********* SOW BINLOG EVENTS IN ... *********
-show binlog events from <binlog_start>;
+******** [master] SHOW BINLOG EVENTS IN <FILE> ********
+show binlog events in 'master-bin.000001' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 # Query # # BEGIN
@@ -20,16 +18,17 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3)
master-bin.000001 # Query # # COMMIT
+******** [master] SHOW BINLOG EVENTS IN <FILE> LIMIT 1 ********
+show binlog events in 'master-bin.000001' from <binlog_start> limit 1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
+******** [master] SHOW BINLOG EVENTS IN <FILE> LIMIT 1,3 ********
+show binlog events in 'master-bin.000001' from <binlog_start> limit 1,3;
+Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4)
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5)
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6)
+master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1)
master-bin.000001 # Query # # COMMIT
-[MASTER] ********* SOW BINLOG EVENTS *********
+******** [master] SHOW BINLOG EVENTS ********
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
@@ -42,30 +41,8 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3)
master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4)
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5)
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6)
-master-bin.000001 # Query # # COMMIT
-[MASTER] ********* SOW BINLOG EVENTS ... LIMIT rows *********
-show binlog events from <binlog_start> limit 3;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1)
-[MASTER] ********* SOW BINLOG EVENTS ... LIMIT offset,rows *********
-show binlog events from <binlog_start> limit 1,4;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1)
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-[SLAVE] ********* SOW BINLOG EVENTS IN ... *********
-show binlog events from <binlog_start>;
+******** [slave] SHOW BINLOG EVENTS IN <FILE> ********
+show binlog events in 'slave-bin.000001' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
slave-bin.000001 # Query # # BEGIN
@@ -77,16 +54,17 @@ slave-bin.000001 # Query # # COMMIT
slave-bin.000001 # Query # # BEGIN
slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3)
slave-bin.000001 # Query # # COMMIT
+******** [slave] SHOW BINLOG EVENTS IN <FILE> LIMIT 1 ********
+show binlog events in 'slave-bin.000001' from <binlog_start> limit 1;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
+******** [slave] SHOW BINLOG EVENTS IN <FILE> LIMIT 1,3 ********
+show binlog events in 'slave-bin.000001' from <binlog_start> limit 1,3;
+Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4)
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5)
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6)
+slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1)
slave-bin.000001 # Query # # COMMIT
-[SLAVE] ********* SOW BINLOG EVENTS *********
+******** [slave] SHOW BINLOG EVENTS ********
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
@@ -99,76 +77,50 @@ slave-bin.000001 # Query # # COMMIT
slave-bin.000001 # Query # # BEGIN
slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3)
slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4)
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5)
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6)
-slave-bin.000001 # Query # # COMMIT
-[SLAVE] ********* SOW BINLOG EVENTS ... LIMIT rows *********
-show binlog events from <binlog_start> limit 3;
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1)
-[SLAVE] ********* SOW BINLOG EVENTS ... LIMIT offset,rows *********
-show binlog events from <binlog_start> limit 1,4;
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1)
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-[SLAVE] ********* SOW RELAYLOG EVENTS IN ... *********
-show relaylog events in 'slave-relay-bin.000002' from <binlog_start>;
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=4
-slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
-slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT)
-slave-relay-bin.000002 # Query # # BEGIN
-slave-relay-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (1)
-slave-relay-bin.000002 # Query # # COMMIT
-slave-relay-bin.000002 # Query # # BEGIN
-slave-relay-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (2)
-slave-relay-bin.000002 # Query # # COMMIT
-slave-relay-bin.000002 # Query # # BEGIN
-slave-relay-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (3)
-slave-relay-bin.000002 # Query # # COMMIT
-slave-relay-bin.000002 # Query # # BEGIN
-slave-relay-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (4)
-slave-relay-bin.000002 # Query # # COMMIT
-slave-relay-bin.000002 # Query # # BEGIN
-slave-relay-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (5)
-slave-relay-bin.000002 # Query # # COMMIT
-slave-relay-bin.000002 # Query # # BEGIN
-slave-relay-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (6)
-slave-relay-bin.000002 # Query # # COMMIT
-[SLAVE] ********* SOW RELAYLOG EVENTS *********
+******** [slave] SHOW RELAYLOG EVENTS IN <FILE> ********
+show relaylog events in 'slave-relay-bin.000003' from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-relay-bin.000003 # Rotate # # master-bin.000001;pos=4
+slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT)
+slave-relay-bin.000003 # Query # # BEGIN
+slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (1)
+slave-relay-bin.000003 # Query # # COMMIT
+slave-relay-bin.000003 # Query # # BEGIN
+slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (2)
+slave-relay-bin.000003 # Query # # COMMIT
+slave-relay-bin.000003 # Query # # BEGIN
+slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (3)
+slave-relay-bin.000003 # Query # # COMMIT
+******** [slave] SHOW RELAYLOG EVENTS IN <FILE> LIMIT 1 ********
+show relaylog events in 'slave-relay-bin.000003' from <binlog_start> limit 1;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-relay-bin.000003 # Rotate # # master-bin.000001;pos=4
+******** [slave] SHOW RELAYLOG EVENTS IN <FILE> LIMIT 1,3 ********
+show relaylog events in 'slave-relay-bin.000003' from <binlog_start> limit 1,3;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT)
+slave-relay-bin.000003 # Query # # BEGIN
+******** [slave] SHOW RELAYLOG EVENTS ********
show relaylog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-relay-bin.000001 # Rotate # # slave-relay-bin.000002;pos=4
-[MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT rows *********
-show relaylog events in 'slave-relay-bin.000002' from <binlog_start> limit 3;
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=4
-slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
-slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT)
-[MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT offset,rows *********
-show relaylog events in 'slave-relay-bin.000002' from <binlog_start> limit 1,3;
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
-slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT)
-slave-relay-bin.000002 # Query # # BEGIN
+slave-relay-bin.000002 # Rotate # # slave-relay-bin.000003;pos=4
FLUSH LOGS;
FLUSH LOGS;
DROP TABLE t1;
-[MASTER] ********* SOW BINLOG EVENTS IN ... *********
+******** [master] SHOW BINLOG EVENTS IN <FILE> ********
show binlog events in 'master-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
-[MASTER] ********* SOW BINLOG EVENTS *********
+******** [master] SHOW BINLOG EVENTS IN <FILE> LIMIT 1 ********
+show binlog events in 'master-bin.000002' from <binlog_start> limit 1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
+******** [master] SHOW BINLOG EVENTS IN <FILE> LIMIT 1,3 ********
+show binlog events in 'master-bin.000002' from <binlog_start> limit 1,3;
+Log_name Pos Event_type Server_id End_log_pos Info
+******** [master] SHOW BINLOG EVENTS ********
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
@@ -181,21 +133,19 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3)
master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4)
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5)
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6)
-master-bin.000001 # Query # # COMMIT
master-bin.000001 # Rotate # # master-bin.000002;pos=4
-[SLAVE] ********* SOW BINLOG EVENTS IN ... *********
+******** [slave] SHOW BINLOG EVENTS IN <FILE> ********
show binlog events in 'slave-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
-[SLAVE] ********* SOW BINLOG EVENTS *********
+******** [slave] SHOW BINLOG EVENTS IN <FILE> LIMIT 1 ********
+show binlog events in 'slave-bin.000002' from <binlog_start> limit 1;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
+******** [slave] SHOW BINLOG EVENTS IN <FILE> LIMIT 1,3 ********
+show binlog events in 'slave-bin.000002' from <binlog_start> limit 1,3;
+Log_name Pos Event_type Server_id End_log_pos Info
+******** [slave] SHOW BINLOG EVENTS ********
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
@@ -208,24 +158,25 @@ slave-bin.000001 # Query # # COMMIT
slave-bin.000001 # Query # # BEGIN
slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3)
slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4)
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5)
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Query # # BEGIN
-slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6)
-slave-bin.000001 # Query # # COMMIT
slave-bin.000001 # Rotate # # slave-bin.000002;pos=4
-[SLAVE] ********* SOW RELAYLOG EVENTS IN ... *********
-show relaylog events from <binlog_start>;
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-relay-bin.000004 # Rotate # # master-bin.000002;pos=4
-slave-relay-bin.000004 # Rotate # # slave-relay-bin.000005;pos=4
-[SLAVE] ********* SOW RELAYLOG EVENTS *********
+******** [slave] SHOW RELAYLOG EVENTS IN <FILE> ********
+show relaylog events in 'slave-relay-bin.000006' from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-relay-bin.000006 # Rotate # # master-bin.000002;pos=4
+slave-relay-bin.000006 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+slave-relay-bin.000006 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
+******** [slave] SHOW RELAYLOG EVENTS IN <FILE> LIMIT 1 ********
+show relaylog events in 'slave-relay-bin.000006' from <binlog_start> limit 1;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-relay-bin.000006 # Rotate # # master-bin.000002;pos=4
+******** [slave] SHOW RELAYLOG EVENTS IN <FILE> LIMIT 1,3 ********
+show relaylog events in 'slave-relay-bin.000006' from <binlog_start> limit 1,3;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-relay-bin.000006 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+slave-relay-bin.000006 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
+******** [slave] SHOW RELAYLOG EVENTS ********
show relaylog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-relay-bin.000004 # Rotate # # master-bin.000002;pos=4
-slave-relay-bin.000004 # Rotate # # slave-relay-bin.000005;pos=4
+slave-relay-bin.000005 # Rotate # # master-bin.000002;pos=4
+slave-relay-bin.000005 # Rotate # # slave-relay-bin.000006;pos=4
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stop_slave.result
index 97a53e025be..527a942900c 100644
--- a/mysql-test/suite/rpl/r/rpl_stop_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result
@@ -74,5 +74,47 @@ include/wait_for_slave_sql_to_start.inc
# Test end
SET GLOBAL debug= '$debug_save';
+include/restart_slave.inc
+[connection master]
+DROP TABLE t1, t2;
+
+# Bug#58546 test rpl_packet timeout failure sporadically on PB
+# ----------------------------------------------------------------------
+# STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
+# possible that IO thread stopped after replicating part of a transaction
+# which SQL thread was executing. SQL thread would be hung if the
+# transaction could not be rolled back safely.
+# It caused some sporadic failures on PB2.
+#
+# This test verifies that when 'STOP SLAVE' is issued by a user, IO
+# thread will continue to fetch the rest events of the transaction which
+# is being executed by SQL thread and is not able to be rolled back safely.
+CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
+CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES(1, 1);
+SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
+[connection slave]
+include/restart_slave.inc
+BEGIN;
+UPDATE t1 SET c2 = 2 WHERE c1 = 1;
+[connection master]
+BEGIN;
+INSERT INTO t1 VALUES(2, 2);
+INSERT INTO t2 VALUES(1);
+UPDATE t1 SET c2 = 3 WHERE c1 = 1;
+COMMIT;
+[connection slave1]
+STOP SLAVE;
+[connection slave]
+ROLLBACK;
+[connection master]
+SET DEBUG_SYNC= 'now SIGNAL signal.continue';
+SET DEBUG_SYNC= 'RESET';
+[connection slave]
+include/wait_for_slave_to_stop.inc
+[connection slave1]
+include/start_slave.inc
+[connection master]
DROP TABLE t1, t2;
+SET GLOBAL debug= $debug_save;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def
index f4806bdba1e..9f49dfd7714 100644
--- a/mysql-test/suite/rpl/t/disabled.def
+++ b/mysql-test/suite/rpl/t/disabled.def
@@ -16,3 +16,5 @@ rpl_row_create_table : Bug#51574 2010-02-27 andrei failed different way tha
rpl_spec_variables : BUG#47661 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux
rpl_log_pos : BUG#55675 2010-09-10 alfranio rpl.rpl_log_pos fails sporadically with error binlog truncated in the middle
rpl_get_master_version_and_clock : Bug#59178 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock
+rpl_row_until : BUG#59543 Jan 26 2011 alfranio Replication test from eits suite rpl_row_until times out
+rpl_stm_until : BUG#59543 Jan 26 2011 alfranio Replication test from eits suite rpl_row_until times out
diff --git a/mysql-test/suite/rpl/t/rpl_cross_version.test b/mysql-test/suite/rpl/t/rpl_cross_version.test
index 7a8cbfd8237..94c9f0432ce 100644
--- a/mysql-test/suite/rpl/t/rpl_cross_version.test
+++ b/mysql-test/suite/rpl/t/rpl_cross_version.test
@@ -12,11 +12,6 @@
--source include/master-slave.inc
-# The test is disabled for windows due to
-# Bug #42879 CHANGE MASTER RELAY_LOG_FILE=path fails on windows
-# Todo: release it from not_windows
---source include/not_windows.inc
-
#
# Bug#31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
#
diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
index 94667485dfe..a89a1847bc6 100644
--- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
@@ -18,6 +18,9 @@
--source include/have_binlog_format_mixed.inc
--echo
+# Set number of retries to connect to master
+let $connect_retry= 20;
+
--echo *** Preparing ***
--connection slave
--source include/stop_slave.inc
@@ -57,7 +60,7 @@ RESET SLAVE;
SET @@global.slave_net_timeout=30;
--enable_warnings
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=5;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=5;
RESET SLAVE;
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
--echo
@@ -68,7 +71,7 @@ SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
SET @@global.slave_net_timeout=50;
--enable_warnings
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root';
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry;
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
SET @@global.slave_net_timeout=@restore_slave_net_timeout;
RESET SLAVE;
@@ -88,7 +91,7 @@ RESET SLAVE;
let $slave_net_timeout= query_get_value(SHOW VARIABLES LIKE 'slave_net_timeout', Value, 1);
inc $slave_net_timeout;
--replace_result $MASTER_MYPORT MASTER_PORT $slave_net_timeout SLAVE_NET_TIMEOUT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=$slave_net_timeout;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=$slave_net_timeout;
RESET SLAVE;
--echo
@@ -98,7 +101,7 @@ RESET SLAVE;
SET @@global.slave_net_timeout=20;
--enable_warnings
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=5;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=5;
SHOW VARIABLES LIKE 'slave_net_timeout';
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
SET @@global.slave_net_timeout=2*@@global.slave_net_timeout;
@@ -118,7 +121,7 @@ SET @@global.slave_net_timeout=500;
SET @@global.slave_net_timeout=200;
RESET SLAVE;
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root';
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry;
--source include/start_slave.inc
--connection master
--sync_slave_with_master
@@ -138,7 +141,7 @@ SET @@global.slave_net_timeout=@restore_slave_net_timeout;
SET @@global.slave_net_timeout=100;
--enable_warnings
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=20;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=20;
--source include/start_slave.inc
--connection master
--sync_slave_with_master
@@ -154,7 +157,7 @@ SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
SET @@global.slave_net_timeout=50;
--enable_warnings
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=30;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=30;
--let $rpl_server_number= 2
--source include/rpl_restart_server.inc
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
@@ -164,7 +167,7 @@ SET @restore_slave_net_timeout=@@global.slave_net_timeout;
# Disable heartbeat
--echo *** Disable heartbeat ***
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=0;
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
SHOW STATUS LIKE 'slave_received_heartbeats';
--source include/start_slave.inc
@@ -188,48 +191,48 @@ let $slave_heartbeat_timeout= query_get_value(SHOW GLOBAL STATUS LIKE 'slave_hea
--echo *** Min slave_heartbeat_timeout ***
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.001;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=0.001;
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
RESET SLAVE;
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.0009;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=0.0009;
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
RESET SLAVE;
--echo
--echo *** Max slave_heartbeat_timeout ***
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=4294967;
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
RESET SLAVE;
--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294968;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=4294968;
RESET SLAVE;
# Check double size of max allowed value for master_heartbeat_period
--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=8589935;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=8589935;
RESET SLAVE;
# Check 2^32
--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967296;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=4294967296;
RESET SLAVE;
--echo
--echo *** Misc incorrect values ***
--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_PARSE_ERROR
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD='-1';
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD='-1';
RESET SLAVE;
--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_PARSE_ERROR
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD='123abc';
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD='123abc';
RESET SLAVE;
--replace_result $MASTER_MYPORT MASTER_PORT
--error ER_PARSE_ERROR
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD='';
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD='';
RESET SLAVE;
--echo
@@ -240,7 +243,7 @@ RESET SLAVE;
# Check received heartbeat events for running slave
--echo *** Running slave ***
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=0.1;
--source include/start_slave.inc
--connection master
--sync_slave_with_master
@@ -342,7 +345,7 @@ DELIMITER ;|
--connection slave
RESET SLAVE;
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=5;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=5;
--source include/start_slave.inc
--connection master
# Enable scheduler
@@ -374,7 +377,7 @@ DROP TABLE t1;
RESET MASTER;
--connection slave
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.5;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=0.5;
let $slave_param_comparison= =;
--source include/start_slave.inc
let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
@@ -401,7 +404,7 @@ SET @@global.slave_compressed_protocol=1;
RESET SLAVE;
SET @@global.slave_compressed_protocol=1;
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=0.1;
--source include/start_slave.inc
let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
let $status_var= slave_received_heartbeats;
@@ -420,7 +423,7 @@ SET @@global.slave_compressed_protocol=0;
STOP SLAVE;
RESET SLAVE;
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=0.1;
--source include/start_slave.inc
let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
--connection master
@@ -439,7 +442,7 @@ let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_b
STOP SLAVE;
RESET SLAVE;
--replace_result $MASTER_MYPORT MASTER_PORT
-eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_CONNECT_RETRY = 5;
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=0.1;
--source include/start_slave.inc
# Wait until slave_received_heartbeats will be incremented
let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
@@ -474,7 +477,7 @@ let $status_var_comparsion= >;
#let $slave_binlog= query_get_value(SHOW MASTER STATUS, File, 1);
--connection master
#--replace_result $SLAVE_MYPORT SLAVE_PORT $slave_binlog SLAVE_BINLOG
-#eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$slave_binlog';
+#eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$slave_binlog';
--source include/start_slave.inc
# Insert data on master and on slave and make sure that it replicated for both directions
diff --git a/mysql-test/suite/rpl/t/rpl_packet.test b/mysql-test/suite/rpl/t/rpl_packet.test
index 69d59e02e2d..7e9a35883a3 100644
--- a/mysql-test/suite/rpl/t/rpl_packet.test
+++ b/mysql-test/suite/rpl/t/rpl_packet.test
@@ -26,8 +26,8 @@ let $old_net_buffer_length= `SELECT @@global.net_buffer_length`;
SET @@global.max_allowed_packet=1024;
SET @@global.net_buffer_length=1024;
+sync_slave_with_master;
# Restart slave for setting to take effect
-connection slave;
source include/stop_slave.inc;
source include/start_slave.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stop_slave.test
index 1529f98397a..ace11cc1467 100644
--- a/mysql-test/suite/rpl/t/rpl_stop_slave.test
+++ b/mysql-test/suite/rpl/t/rpl_stop_slave.test
@@ -45,7 +45,69 @@ source extra/rpl_tests/rpl_stop_slave.test;
--echo
--echo # Test end
SET GLOBAL debug= '$debug_save';
+source include/restart_slave_sql.inc;
-connection master;
+--source include/rpl_connection_master.inc
DROP TABLE t1, t2;
+
+--echo
+--echo # Bug#58546 test rpl_packet timeout failure sporadically on PB
+--echo # ----------------------------------------------------------------------
+--echo # STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
+--echo # possible that IO thread stopped after replicating part of a transaction
+--echo # which SQL thread was executing. SQL thread would be hung if the
+--echo # transaction could not be rolled back safely.
+--echo # It caused some sporadic failures on PB2.
+--echo #
+--echo # This test verifies that when 'STOP SLAVE' is issued by a user, IO
+--echo # thread will continue to fetch the rest events of the transaction which
+--echo # is being executed by SQL thread and is not able to be rolled back safely.
+
+CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
+CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES(1, 1);
+
+let $debug_save= `SELECT @@GLOBAL.debug`;
+SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
+
+sync_slave_with_master;
+
+--source include/rpl_connection_slave.inc
+source include/restart_slave_sql.inc;
+
+BEGIN;
+UPDATE t1 SET c2 = 2 WHERE c1 = 1;
+
+--source include/rpl_connection_master.inc
+BEGIN;
+INSERT INTO t1 VALUES(2, 2);
+INSERT INTO t2 VALUES(1);
+UPDATE t1 SET c2 = 3 WHERE c1 = 1;
+COMMIT;
+
+--source include/rpl_connection_slave1.inc
+let $show_statement= SHOW PROCESSLIST;
+let $field= Info;
+let $condition= = 'UPDATE t1 SET c2 = 3 WHERE c1 = 1';
+source include/wait_show_condition.inc;
+
+send STOP SLAVE;
+
+--source include/rpl_connection_slave.inc
+ROLLBACK;
+
+--source include/rpl_connection_master.inc
+SET DEBUG_SYNC= 'now SIGNAL signal.continue';
+SET DEBUG_SYNC= 'RESET';
+
+--source include/rpl_connection_slave.inc
+source include/wait_for_slave_to_stop.inc;
+
+--source include/rpl_connection_slave1.inc
+reap;
+source include/start_slave.inc;
+
+--source include/rpl_connection_master.inc
+DROP TABLE t1, t2;
+SET GLOBAL debug= $debug_save;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/sys_vars/r/autocommit_func4.result b/mysql-test/suite/sys_vars/r/autocommit_func4.result
new file mode 100644
index 00000000000..5fcb50526f2
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/autocommit_func4.result
@@ -0,0 +1,46 @@
+CREATE TABLE t1
+(
+id INT NOT NULL auto_increment,
+PRIMARY KEY (id),
+name varchar(30)
+) ENGINE = INNODB;
+SELECT @@global.autocommit;
+@@global.autocommit
+1
+SELECT @@autocommit;
+@@autocommit
+1
+INSERT into t1(name) values('Record_1');
+INSERT into t1(name) values('Record_2');
+SELECT * from t1;
+id name
+1 Record_1
+2 Record_2
+ROLLBACK;
+SELECT * from t1;
+id name
+1 Record_1
+2 Record_2
+set @@global.autocommit = 1-@@global.autocommit;
+set @@autocommit = 1-@@autocommit;
+SELECT @@global.autocommit;
+@@global.autocommit
+0
+SELECT @@autocommit;
+@@autocommit
+0
+INSERT into t1(name) values('Record_1');
+INSERT into t1(name) values('Record_2');
+SELECT * from t1;
+id name
+1 Record_1
+2 Record_2
+3 Record_1
+4 Record_2
+ROLLBACK;
+SELECT * from t1;
+id name
+1 Record_1
+2 Record_2
+DROP TABLE t1;
+set @@global.autocommit = 1-@@global.autocommit;
diff --git a/mysql-test/suite/sys_vars/r/autocommit_func5.result b/mysql-test/suite/sys_vars/r/autocommit_func5.result
new file mode 100644
index 00000000000..6807c594cb1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/autocommit_func5.result
@@ -0,0 +1,42 @@
+CREATE TABLE t1
+(
+id INT NOT NULL auto_increment,
+PRIMARY KEY (id),
+name varchar(30)
+) ENGINE = INNODB;
+SELECT @@global.autocommit;
+@@global.autocommit
+0
+SELECT @@autocommit;
+@@autocommit
+0
+INSERT into t1(name) values('Record_1');
+INSERT into t1(name) values('Record_2');
+SELECT * from t1;
+id name
+1 Record_1
+2 Record_2
+ROLLBACK;
+SELECT * from t1;
+id name
+set @@global.autocommit = 1-@@global.autocommit;
+set @@autocommit = 1-@@autocommit;
+SELECT @@global.autocommit;
+@@global.autocommit
+1
+SELECT @@autocommit;
+@@autocommit
+1
+INSERT into t1(name) values('Record_1');
+INSERT into t1(name) values('Record_2');
+SELECT * from t1;
+id name
+3 Record_1
+4 Record_2
+ROLLBACK;
+SELECT * from t1;
+id name
+3 Record_1
+4 Record_2
+DROP TABLE t1;
+set @@global.autocommit = 1-@@global.autocommit;
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
index baf06092126..55de5adbc33 100644
--- a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
+++ b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
@@ -64,12 +64,12 @@ SET last = pct;
END IF;
END WHILE;
END//
-CREATE PROCEDURE check_pct(IN num DECIMAL)
+CREATE PROCEDURE check_pct(IN success_on_wait BOOLEAN)
BEGIN
-IF (dirty_pct() < num) THEN
+IF (success_on_wait > 0) THEN
SELECT 'BELOW_MAX' AS PCT_VALUE;
ELSE
-SELECT 'ABOVE_MAX' AS PCT_VALUE;
+SELECT 'ABOVE_MAX or TimeOut Of The Test' AS PCT_VALUE;
END IF;
END//
CREATE TABLE t1(
@@ -83,7 +83,7 @@ CALL add_until(10);
FLUSH TABLES;
CALL add_records(500);
'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
-CALL check_pct(10);
+CALL check_pct(1);
PCT_VALUE
BELOW_MAX
DROP PROCEDURE add_records;
diff --git a/mysql-test/suite/sys_vars/t/autocommit_func4-master.opt b/mysql-test/suite/sys_vars/t/autocommit_func4-master.opt
new file mode 100644
index 00000000000..788990274dd
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/autocommit_func4-master.opt
@@ -0,0 +1 @@
+--autocommit=on
diff --git a/mysql-test/suite/sys_vars/t/autocommit_func4.test b/mysql-test/suite/sys_vars/t/autocommit_func4.test
new file mode 100644
index 00000000000..9bb4c26d5d5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/autocommit_func4.test
@@ -0,0 +1 @@
+--source suite/sys_vars/inc/autocommit_func2.inc
diff --git a/mysql-test/suite/sys_vars/t/autocommit_func5-master.opt b/mysql-test/suite/sys_vars/t/autocommit_func5-master.opt
new file mode 100644
index 00000000000..409cb3ec891
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/autocommit_func5-master.opt
@@ -0,0 +1 @@
+--autocommit=off
diff --git a/mysql-test/suite/sys_vars/t/autocommit_func5.test b/mysql-test/suite/sys_vars/t/autocommit_func5.test
new file mode 100644
index 00000000000..9bb4c26d5d5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/autocommit_func5.test
@@ -0,0 +1 @@
+--source suite/sys_vars/inc/autocommit_func2.inc
diff --git a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
index b577ae5fcc4..c7a9e567e69 100644
--- a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
+++ b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
@@ -117,12 +117,12 @@ BEGIN
END WHILE;
END//
-CREATE PROCEDURE check_pct(IN num DECIMAL)
+CREATE PROCEDURE check_pct(IN success_on_wait BOOLEAN)
BEGIN
- IF (dirty_pct() < num) THEN
+ IF (success_on_wait > 0) THEN
SELECT 'BELOW_MAX' AS PCT_VALUE;
ELSE
- SELECT 'ABOVE_MAX' AS PCT_VALUE;
+ SELECT 'ABOVE_MAX or TimeOut Of The Test' AS PCT_VALUE;
END IF;
END//
@@ -155,7 +155,8 @@ let $wait_condition= SELECT (dirty_pct() <= @@global.innodb_max_dirty_pages_pct)
--source include/wait_condition.inc
--echo 'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
-CALL check_pct(10);
+# Value For $sucess will be set from include/wait_condition.inc file. It can have values 1 or 0. It will be 1 if dirty_pct() <= @@global.innodb_max_dirty_pages_pct else it will be 0.
+eval CALL check_pct($success);
DROP PROCEDURE add_records;
DROP PROCEDURE add_until;
DROP PROCEDURE check_pct;
diff --git a/mysql-test/t/bug46261.test b/mysql-test/t/bug46261.test
index 67bdc995850..e0eae9b86fb 100644
--- a/mysql-test/t/bug46261.test
+++ b/mysql-test/t/bug46261.test
@@ -7,7 +7,7 @@
--replace_regex /\.dll/.so/
--error ER_OPTION_PREVENTS_STATEMENT
-eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
+eval INSTALL PLUGIN example SONAME '$EXAMPLE_PLUGIN';
--replace_regex /\.dll/.so/
--error ER_OPTION_PREVENTS_STATEMENT
diff --git a/mysql-test/t/ctype_many.test b/mysql-test/t/ctype_many.test
index 5aa1f6e7c7d..060cf9fcf92 100644
--- a/mysql-test/t/ctype_many.test
+++ b/mysql-test/t/ctype_many.test
@@ -217,6 +217,21 @@ DROP TABLE t1;
--echo #
+--echo # Start of 5.1 tests
+--echo #
+
+--echo #
+--echo # Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function
+--echo #
+
+SET NAMES latin1;
+DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1)
+ AS BINARY(0)) USING utf8);
+--echo #
+--echo # End of 5.1 tests
+--echo #
+
+--echo #
--echo # Start of 5.5 tests
--echo #
diff --git a/mysql-test/t/fulltext_plugin.test b/mysql-test/t/fulltext_plugin.test
index 25e4302ef0d..b591a7949e5 100644
--- a/mysql-test/t/fulltext_plugin.test
+++ b/mysql-test/t/fulltext_plugin.test
@@ -4,7 +4,7 @@
# BUG#39746 - Debug flag breaks struct definition (server crash)
#
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN simple_parser SONAME $MYPLUGLIB_SO;
+eval INSTALL PLUGIN simple_parser SONAME '$SIMPLE_PARSER';
CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser);
ALTER TABLE t1 ADD FULLTEXT(b) WITH PARSER simple_parser;
DROP TABLE t1;
diff --git a/mysql-test/t/func_like.test b/mysql-test/t/func_like.test
index 1204d04d9a0..f1fe52274b2 100644
--- a/mysql-test/t/func_like.test
+++ b/mysql-test/t/func_like.test
@@ -126,5 +126,10 @@ INSERT INTO t2 VALUES (1), (2), (3);
SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
DROP TABLE t1, t2;
+--echo #
+--echo # Bug#59149 valgrind warnings with "like .. escape .." function
+--echo #
+--error ER_WRONG_ARGUMENTS
+SELECT '' LIKE '1' ESCAPE COUNT(1);
--echo End of 5.1 tests
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test
index b089d10a33b..e56b9c7d20d 100644
--- a/mysql-test/t/func_math.test
+++ b/mysql-test/t/func_math.test
@@ -489,3 +489,14 @@ as foo;
CREATE TABLE t1(a char(0));
INSERT INTO t1 (SELECT -pi());
DROP TABLE t1;
+
+--echo #
+--echo # Bug #59241 invalid memory read
+--echo # in do_div_mod with doubly assigned variables
+--echo #
+SELECT ((@a:=@b:=1.0) div (@b:=@a:=get_format(datetime, 'usa')));
+
+--echo #
+--echo # Bug #59498 div function broken in mysql-trunk
+--echo #
+SELECT 1 div null;
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index aff99d7e303..9a9a8110a74 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -1370,6 +1370,17 @@ DROP TABLE t1;
SELECT '1' IN ('1', SUBSTRING(-9223372036854775809, 1));
SELECT CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3));
+--echo #
+--echo # Bug#58165: "my_empty_string" gets modified and causes LOAD DATA to fail
+--echo # and other crashes
+--echo #
+CREATE TABLE t1 ( a TEXT );
+SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE 'bug58165.txt';
+SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' );
+LOAD DATA INFILE 'bug58165.txt' INTO TABLE t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
--echo End of 5.1 tests
--echo Start of 5.4 tests
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index 6c0fdda1cea..7ca364d935c 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -361,7 +361,7 @@ t1 where object_id=85998;
# Expected result is 36.3310176346905, but IA64 returns 36.3310176346904
# due to fused multiply-add instructions.
---replace_result 36.3310176346904 36.3310176346905
+--replace_result 36.3310176346904 36.3310176346905 -114.87787186923326 -114.87787186923313 36.33101763469053 36.33101763469059 36.33101763469043 36.33101763469059
select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
t1 where object_id=85984;
diff --git a/mysql-test/t/innodb_mysql_sync.test b/mysql-test/t/innodb_mysql_sync.test
index 22c6f3874bc..a8925306c70 100644
--- a/mysql-test/t/innodb_mysql_sync.test
+++ b/mysql-test/t/innodb_mysql_sync.test
@@ -147,6 +147,139 @@ SET DEBUG_SYNC= 'RESET';
disconnect con1;
+--echo #
+--echo # Bug#42230 during add index, cannot do queries on storage engines
+--echo # that implement add_index
+--echo #
+
+--disable_warnings
+DROP DATABASE IF EXISTS db1;
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+connect(con1,localhost,root);
+connect(con2,localhost,root);
+
+--echo # Test 1: Secondary index, should not block reads (original test case).
+
+--echo # Connection default
+connection default;
+CREATE DATABASE db1;
+CREATE TABLE db1.t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, value INT) engine=innodb;
+INSERT INTO db1.t1(value) VALUES (1), (2);
+SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+--echo # Sending:
+--send ALTER TABLE db1.t1 ADD INDEX(value)
+
+--echo # Connection con1
+connection con1;
+SET DEBUG_SYNC= "now WAIT_FOR manage";
+# Neither of these two statements should be blocked
+USE db1;
+SELECT * FROM t1;
+SET DEBUG_SYNC= "now SIGNAL query";
+
+--echo # Connection default
+connection default;
+--echo # Reaping: ALTER TABLE db1.t1 ADD INDEX(value)
+--reap
+DROP DATABASE db1;
+
+--echo # Test 2: Primary index (implicit), should block reads.
+
+CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
+SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+--echo # Sending:
+--send ALTER TABLE t1 ADD UNIQUE INDEX(a)
+
+--echo # Connection con1
+connection con1;
+SET DEBUG_SYNC= "now WAIT_FOR manage";
+USE test;
+--echo # Sending:
+--send SELECT * FROM t1
+
+--echo # Connection con2
+connection con2;
+--echo # Waiting for SELECT to be blocked by the metadata lock on t1
+let $wait_condition= SELECT COUNT(*)= 1 FROM information_schema.processlist
+ WHERE state= 'Waiting for table metadata lock'
+ AND info='SELECT * FROM t1';
+--source include/wait_condition.inc
+SET DEBUG_SYNC= "now SIGNAL query";
+
+--echo # Connection default
+connection default;
+--echo # Reaping: ALTER TABLE t1 ADD UNIQUE INDEX(a)
+--reap
+
+--echo # Connection con1
+connection con1;
+--echo # Reaping: SELECT * FROM t1
+--reap
+
+--echo # Test 3: Primary index (explicit), should block reads.
+
+--echo # Connection default
+connection default;
+ALTER TABLE t1 DROP INDEX a;
+SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+--echo # Sending:
+--send ALTER TABLE t1 ADD PRIMARY KEY (a)
+
+--echo # Connection con1
+connection con1;
+SET DEBUG_SYNC= "now WAIT_FOR manage";
+--echo # Sending:
+--send SELECT * FROM t1
+
+--echo # Connection con2
+connection con2;
+--echo # Waiting for SELECT to be blocked by the metadata lock on t1
+let $wait_condition= SELECT COUNT(*)= 1 FROM information_schema.processlist
+ WHERE state= 'Waiting for table metadata lock'
+ AND info='SELECT * FROM t1';
+--source include/wait_condition.inc
+SET DEBUG_SYNC= "now SIGNAL query";
+
+--echo # Connection default
+connection default;
+--echo # Reaping: ALTER TABLE t1 ADD PRIMARY KEY (a)
+--reap
+
+--echo # Connection con1
+connection con1;
+--echo # Reaping: SELECT * FROM t1
+--reap
+
+--echo # Test 4: Secondary unique index, should not block reads.
+# This requires HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE to be supported
+# by InnoDB. Adding this flag currently introduces a regression so
+# this test is disabled until the regression has been fixed.
+
+--echo # Connection default
+connection default;
+#SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+#--echo # Sending:
+#--send ALTER TABLE t1 ADD UNIQUE (b)
+
+#--echo # Connection con1
+#connection con1;
+#SET DEBUG_SYNC= "now WAIT_FOR manage";
+#SELECT * FROM t1;
+#SET DEBUG_SYNC= "now SIGNAL query";
+
+#--echo # Connection default
+#connection default;
+#--echo # Reaping: ALTER TABLE t1 ADD UNIQUE (b)
+#--reap
+
+disconnect con1;
+disconnect con2;
+SET DEBUG_SYNC= "RESET";
+DROP TABLE t1;
+
+
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index 3251ff292b6..72d27d3571a 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -1010,4 +1010,86 @@ GROUP BY t2.f1, t2.f2;
DROP TABLE t1,t2;
+--echo #
+--echo # Bug#57034 incorrect OUTER JOIN result when joined on unique key
+--echo #
+
+CREATE TABLE t1 (pk INT PRIMARY KEY,
+ col_int INT,
+ col_int_unique INT UNIQUE KEY);
+INSERT INTO t1 VALUES (1,NULL,2), (2,0,0);
+
+CREATE TABLE t2 (pk INT PRIMARY KEY,
+ col_int INT,
+ col_int_unique INT UNIQUE KEY);
+INSERT INTO t2 VALUES (1,0,1), (2,0,2);
+
+EXPLAIN
+SELECT * FROM t1 LEFT JOIN t2
+ ON t1.col_int_unique = t2.col_int_unique AND t1.col_int = t2.col_int
+ WHERE t1.pk=1;
+
+SELECT * FROM t1 LEFT JOIN t2
+ ON t1.col_int_unique = t2.col_int_unique AND t1.col_int = t2.col_int
+ WHERE t1.pk=1;
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # Bug#48046 Server incorrectly processing JOINs on NULL values
+--echo #
+
+# bug#48046 is a duplicate of bug#57034
+
+CREATE TABLE `BB` (
+ `pk` int(11) NOT NULL AUTO_INCREMENT,
+ `time_key` time DEFAULT NULL,
+ `varchar_key` varchar(1) DEFAULT NULL,
+ `varchar_nokey` varchar(1) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `time_key` (`time_key`),
+ KEY `varchar_key` (`varchar_key`)
+) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
+
+INSERT INTO `BB` VALUES (10,'18:27:58',NULL,NULL);
+
+SELECT table1.time_key AS field1, table2.pk
+FROM BB table1 LEFT JOIN BB table2
+ ON table2.varchar_nokey = table1.varchar_key
+ HAVING field1;
+
+DROP TABLE BB;
+
+--echo #
+--echo # Bug#49600 Server incorrectly processing RIGHT JOIN with
+--echo # constant WHERE clause and no index
+--echo #
+
+# bug#49600 is a duplicate of bug#57034
+
+CREATE TABLE `BB` (
+ `col_datetime_key` datetime DEFAULT NULL,
+ `col_varchar_key` varchar(1) DEFAULT NULL,
+ `col_varchar_nokey` varchar(1) DEFAULT NULL,
+ KEY `col_datetime_key` (`col_datetime_key`),
+ KEY `col_varchar_key` (`col_varchar_key`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+INSERT INTO `BB` VALUES ('1900-01-01 00:00:00',NULL,NULL);
+
+SELECT table1.col_datetime_key
+FROM BB table1 RIGHT JOIN BB table2
+ ON table2 .col_varchar_nokey = table1.col_varchar_key
+ WHERE 7;
+
+# Disable keys, and we get incorrect result for the same query
+ALTER TABLE BB DISABLE KEYS;
+
+SELECT table1.col_datetime_key
+FROM BB table1 RIGHT JOIN BB table2
+ ON table2 .col_varchar_nokey = table1.col_varchar_key
+ WHERE 7;
+
+DROP TABLE BB;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/mysqladmin.test b/mysql-test/t/mysqladmin.test
index eb59e60eefe..c3bfc585289 100644
--- a/mysql-test/t/mysqladmin.test
+++ b/mysql-test/t/mysqladmin.test
@@ -33,3 +33,15 @@ EOF
--exec $MYSQLADMIN --defaults-file=$MYSQLTEST_VARDIR/tmp/bug10608.cnf --default-character-set=latin1 -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/bug10608.cnf;
+
+--echo #
+--echo # Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
+--echo #
+
+--echo # Executing mysqladmin with --sleep=1 and --count=2.
+--exec $MYSQLADMIN -u root -S $MASTER_MYSOCK -P $MASTER_MYPORT --sleep=1 --count=2 ping > $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
+--echo # Done.
+--echo # Displaying the output :
+--cat_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
+
+--remove_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
diff --git a/mysql-test/t/mysqlbinlog_row_big.test b/mysql-test/t/mysqlbinlog_row_big.test
index 75f3b90269f..ffd1b79af34 100644
--- a/mysql-test/t/mysqlbinlog_row_big.test
+++ b/mysql-test/t/mysqlbinlog_row_big.test
@@ -79,8 +79,8 @@ eval CREATE TABLE t1 (
--echo # Insert some big rows.
--echo #
---echo 256MB
-INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 16777216));
+--echo 64MB
+INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 4194304));
--echo 32MB
INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 2097152));
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 952a3f94fb2..8ffa2e164cd 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -2169,6 +2169,15 @@ SELECT LENGTH(a) FROM t2;
DROP TABLE t1, t2;
###########################################################################
+
+--echo #
+--echo # Bug #13618 : mysqldump --xml ommit comment on table field
+--echo #
+
+CREATE TABLE `comment_table` (i INT COMMENT 'FIELD COMMENT') COMMENT = 'TABLE COMMENT';
+--exec $MYSQL_DUMP --compact --skip-create --xml test
+DROP TABLE `comment_table`;
+
--echo #
--echo # End of 5.1 tests
--echo #
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index 7108b9f9878..9ff92496653 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -859,6 +859,12 @@ insert into t1 values ('`select 42`');
let $a= `select * from t1`;
# This should output `select 42`, not evaluate it again to 42
echo $a;
+insert into t1 values ('$dollar');
+# These should also output the string without evaluating it.
+let $a= query_get_value(select * from t1 order by a, a, 1);
+echo $a;
+let $a= query_get_value(select * from t1 order by a, a, 2);
+echo $a;
drop table t1;
--error 1
diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
index 1e0032a2bfa..61b14b81fca 100644
--- a/mysql-test/t/partition_error.test
+++ b/mysql-test/t/partition_error.test
@@ -11,6 +11,21 @@ drop table if exists t1, t2;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
--echo #
+--echo # Bug#57924: crash when creating partitioned table with
+--echo # multiple columns in the partition key
+--echo #
+--error ER_SAME_NAME_PARTITION_FIELD
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, a);
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(A, b);
+DROP TABLE t1;
+--error ER_SAME_NAME_PARTITION_FIELD
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, A);
+
+
+--echo #
--echo # Bug#54483: valgrind errors when making warnings for multiline inserts
--echo # into partition
--echo #
@@ -670,7 +685,6 @@ PARTITION BY HASH (TIME_TO_SEC(a));
CREATE TABLE t1 (a INT)
PARTITION BY HASH (TIME_TO_SEC(a));
-
--echo #
--echo # Bug#50036: Inconsistent errors when using TIMESTAMP
--echo # columns/expressions
diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test
index 0bf86b47dd7..117eaf1e19b 100644
--- a/mysql-test/t/plugin.test
+++ b/mysql-test/t/plugin.test
@@ -5,15 +5,15 @@ CREATE TABLE t1(a int) ENGINE=EXAMPLE;
DROP TABLE t1;
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
+eval INSTALL PLUGIN example SONAME '$EXAMPLE_PLUGIN';
--replace_regex /\.dll/.so/
--error 1125
-eval INSTALL PLUGIN EXAMPLE SONAME $HA_EXAMPLE_SO;
+eval INSTALL PLUGIN EXAMPLE SONAME '$EXAMPLE_PLUGIN';
UNINSTALL PLUGIN example;
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
+eval INSTALL PLUGIN example SONAME '$EXAMPLE_PLUGIN';
CREATE TABLE t1(a int) ENGINE=EXAMPLE;
@@ -41,7 +41,7 @@ UNINSTALL PLUGIN non_exist;
--echo # to impossible int val
--echo #
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
+eval INSTALL PLUGIN example SONAME '$EXAMPLE_PLUGIN';
SET GLOBAL example_enum_var= e1;
SET GLOBAL example_enum_var= e2;
@@ -56,7 +56,7 @@ UNINSTALL PLUGIN example;
# Bug #32757 hang with sql_mode set when setting some global variables
#
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
+eval INSTALL PLUGIN example SONAME '$EXAMPLE_PLUGIN';
select @@session.sql_mode into @old_sql_mode;
diff --git a/mysql-test/t/plugin_auth.test b/mysql-test/t/plugin_auth.test
index 49fbfa6995b..5efb50a41e1 100644
--- a/mysql-test/t/plugin_auth.test
+++ b/mysql-test/t/plugin_auth.test
@@ -395,7 +395,7 @@ FLUSH PRIVILEGES;
FLUSH PRIVILEGES;
--echo #
---echo # Bug#58139 : default-auth option not recognized in MySQL standardi
+--echo # Bug#58139 : default-auth option not recognized in MySQL standard
--echo # command line clients
--echo #
@@ -408,4 +408,7 @@ FLUSH PRIVILEGES;
--echo # Executing 'mysqldump'
--exec $MYSQL_DUMP -u root -S $MASTER_MYSOCK -P $MASTER_MYPORT --compact --default-auth=auth_test_plugin $PLUGIN_AUTH_OPT test
+--echo # Executing 'mysql_upgrade'
+--exec $MYSQL_UPGRADE -u root -S $MASTER_MYSOCK -P $MASTER_MYPORT --default-auth=auth_test_plugin $PLUGIN_AUTH_OPT --skip-verbose --force --upgrade-system-tables
+
--echo End of 5.5 tests
diff --git a/mysql-test/t/plugin_auth_qa_2-master.opt b/mysql-test/t/plugin_auth_qa_2-master.opt
index c29153ac95b..354907b9366 100644
--- a/mysql-test/t/plugin_auth_qa_2-master.opt
+++ b/mysql-test/t/plugin_auth_qa_2-master.opt
@@ -1,2 +1,2 @@
-$PLUGIN_AUTH_OPT
-$PLUGIN_AUTH_INTERFACE
+$PLUGIN_AUTH_INTERFACE_OPT
+$PLUGIN_AUTH_INTERFACE_LOAD
diff --git a/mysql-test/t/plugin_auth_qa_3-master.opt b/mysql-test/t/plugin_auth_qa_3-master.opt
index 5cc2af0a358..e1754862a4d 100644
--- a/mysql-test/t/plugin_auth_qa_3-master.opt
+++ b/mysql-test/t/plugin_auth_qa_3-master.opt
@@ -1,2 +1,2 @@
-$PLUGIN_AUTH_OPT
-$PLUGIN_AUTH_SERVER
+$PLUGIN_AUTH_SERVER_OPT
+$PLUGIN_AUTH_SERVER_LOAD
diff --git a/mysql-test/t/plugin_not_embedded.test b/mysql-test/t/plugin_not_embedded.test
index 40024efcaad..a2b7b8a0fe4 100644
--- a/mysql-test/t/plugin_not_embedded.test
+++ b/mysql-test/t/plugin_not_embedded.test
@@ -8,7 +8,7 @@
GRANT INSERT ON mysql.plugin TO bug51770@localhost;
connect(con1,localhost,bug51770,,);
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
+eval INSTALL PLUGIN example SONAME '$EXAMPLE_PLUGIN';
--error ER_TABLEACCESS_DENIED_ERROR
UNINSTALL PLUGIN example;
connection default;
@@ -25,7 +25,7 @@ DROP USER bug51770@localhost;
# The bug consisted of not recognizing / on Windows, so checking / on
# all platforms should cover this case.
-let $path = `select CONCAT_WS('/', '..', $HA_EXAMPLE_SO)`;
+let $path = `select CONCAT_WS('/', '..', '$EXAMPLE_PLUGIN')`;
--replace_regex /\.dll/.so/
--error ER_UDF_NO_PATHS
eval INSTALL PLUGIN example SONAME '$path';
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 3ed7213e8d7..043b03e4686 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -4123,6 +4123,76 @@ SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
DROP TABLE t1;
+
+--echo #
+--echo # Bug #58422: Incorrect result when OUTER JOIN'ing
+--echo # with an empty table
+--echo #
+
+CREATE TABLE t_empty(pk INT PRIMARY KEY, i INT) ENGINE = MYISAM;
+CREATE TABLE t1(pk INT PRIMARY KEY, i INT) ENGINE = MYISAM;
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+CREATE TABLE t2(pk INT PRIMARY KEY, i INT) ENGINE = MYISAM;
+INSERT INTO t2 VALUES (1,1), (2,2), (3,3);
+
+EXPLAIN
+SELECT *
+ FROM
+ t1
+ LEFT OUTER JOIN
+ (t2 INNER JOIN t_empty ON TRUE)
+ ON t1.pk=t2.pk
+ WHERE t2.pk <> 2;
+
+SELECT *
+ FROM
+ t1
+ LEFT OUTER JOIN
+ (t2 INNER JOIN t_empty ON TRUE)
+ ON t1.pk=t2.pk
+ WHERE t2.pk <> 2;
+
+
+EXPLAIN
+SELECT *
+ FROM
+ t1
+ LEFT OUTER JOIN
+ (t2 CROSS JOIN t_empty)
+ ON t1.pk=t2.pk
+ WHERE t2.pk <> 2;
+
+SELECT *
+ FROM
+ t1
+ LEFT OUTER JOIN
+ (t2 CROSS JOIN t_empty)
+ ON t1.pk=t2.pk
+ WHERE t2.pk <> 2;
+
+
+EXPLAIN
+SELECT *
+ FROM
+ t1
+ LEFT OUTER JOIN
+ (t2 INNER JOIN t_empty ON t_empty.i=t2.i)
+ ON t1.pk=t2.pk
+ WHERE t2.pk <> 2;
+
+SELECT *
+ FROM
+ t1
+ LEFT OUTER JOIN
+ (t2 INNER JOIN t_empty ON t_empty.i=t2.i)
+ ON t1.pk=t2.pk
+ WHERE t2.pk <> 2;
+
+
+
+DROP TABLE t1,t2,t_empty;
+
+
--echo End of 5.1 tests
--echo #
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index 32b1f6bbc90..a334a5f7791 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -1,3 +1,33 @@
+# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; version 2 of
+# the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA
+#
+
+################################################################################
+#
+# NOTICE:
+#
+# This file unfortunately contains characters in various different encodings.
+# Be careful when editing this file to ensure that you (or your editor) do
+# not change things (such as encodings) on lines that you did not mean to
+# modify.
+#
+################################################################################
+
+
# Uses GRANT commands that usually disabled in embedded server
-- source include/not_embedded.inc
@@ -223,14 +253,6 @@ CREATE TABLE """a" (i INT);
SHOW CREATE TABLE """a";
DROP TABLE """a";
-# Bug#4374 SHOW TABLE STATUS FROM ignores collation_connection
-#set names latin1;
-#create database `ä`;
-#create table `ä`.`ä` (a int) engine=heap;
-#--replace_column 7 # 8 # 9 #
-#show table status from `ä` LIKE 'ä';
-#drop database `ä`;
-
# to test quotes around keywords.. :
SET sql_mode= '';
@@ -362,15 +384,6 @@ delete from mysql.db
where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
flush privileges;
-# This test fails on MAC OSX, so it is temporary disabled.
-# This needs WL#1324 to be done.
-#set names latin1;
-#create database `ä`;
-#create table `ä`.`ä` (a int) engine=heap;
-#--replace_column 7 # 8 # 9 #
-#show table status from `ä` LIKE 'ä';
-#drop database `ä`;
-
# Test that USING <keytype> is always shown in SHOW CREATE TABLE when it was
# specified during table creation, but not otherwise. (Bug#7235)
CREATE TABLE t1 (i int, KEY (i)) ENGINE=MEMORY;
@@ -1053,6 +1066,17 @@ show full tables;
drop table `été`;
set names latin1;
+--echo #
+--echo # Bug#4374 SHOW TABLE STATUS FROM ignores collation_connection
+--echo # Character set: Latin-1 (ISO-8859-1)
+--echo #
+SET NAMES latin1;
+CREATE DATABASE `ä`;
+CREATE TABLE `ä`.`ä` (a int) ENGINE=Memory;
+--replace_column 6 # 7 # 8 # 9 #
+SHOW TABLE STATUS FROM `ä` LIKE 'ä';
+DROP DATABASE `ä`;
+
#
# Bug#26402 Server crashes with old-style named table
#
diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test
index ca2a7804907..25d3c8f7e91 100644
--- a/mysql-test/t/type_datetime.test
+++ b/mysql-test/t/type_datetime.test
@@ -445,6 +445,17 @@ SELECT CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.012345' AS
# show we truncate microseconds from the right
SELECT CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime) AS DECIMAL(30,7));
+--echo #
+--echo # Bug#59173: Failure to handle DATE(TIME) values where Year, Month or
+--echo # Day is ZERO
+--echo #
+CREATE TABLE t1 (dt1 DATETIME);
+INSERT INTO t1 (dt1) VALUES ('0000-00-01 00:00:01');
+DELETE FROM t1 WHERE dt1 = '0000-00-01 00:00:01';
+--echo # Should be empty
+SELECT * FROM t1;
+DROP TABLE t1;
+
--echo End of 5.1 tests
--echo #
diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test
index 1dc5eadbccc..3bc580fe4e5 100644
--- a/mysql-test/t/xml.test
+++ b/mysql-test/t/xml.test
@@ -640,6 +640,11 @@ SELECT UPDATEXML(NULL, (LPAD(0.1111E-15, '2011', 1)), 1);
--error ER_ILLEGAL_VALUE_FOR_TYPE
SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1));
+--echo #
+--echo # Bug #44332 my_xml_scan reads behind the end of buffer
+--echo #
+SELECT UPDATEXML(CONVERT(_latin1'<' USING utf8),'1','1');
+SELECT UPDATEXML(CONVERT(_latin1'<!--' USING utf8),'1','1');
--echo End of 5.1 tests
diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp
index 4526575dafa..725e7da43db 100644
--- a/mysql-test/valgrind.supp
+++ b/mysql-test/valgrind.supp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2008 MySQL AB
+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
@@ -10,10 +10,9 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# Suppress some common (not fatal) errors in system libraries found by valgrind