diff options
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/have_semisync_plugin.inc | 14 | ||||
-rw-r--r-- | mysql-test/include/have_ssl_communication.inc | 4 | ||||
-rw-r--r-- | mysql-test/include/master-slave.inc | 2 | ||||
-rw-r--r-- | mysql-test/include/mtr_warnings.sql | 4 | ||||
-rw-r--r-- | mysql-test/include/setup_fake_relay_log.inc | 16 | ||||
-rw-r--r-- | mysql-test/include/show_binlog_events.inc | 29 | ||||
-rw-r--r-- | mysql-test/include/show_binlog_events2.inc | 2 | ||||
-rw-r--r-- | mysql-test/include/show_relaylog_events.inc | 35 | ||||
-rw-r--r-- | mysql-test/include/test_fieldsize.inc | 2 | ||||
-rw-r--r-- | mysql-test/include/wait_until_disconnected.inc | 2 |
10 files changed, 103 insertions, 7 deletions
diff --git a/mysql-test/include/have_semisync_plugin.inc b/mysql-test/include/have_semisync_plugin.inc new file mode 100644 index 00000000000..481092f415a --- /dev/null +++ b/mysql-test/include/have_semisync_plugin.inc @@ -0,0 +1,14 @@ +# +# Check if server has support for loading plugins +# +if (`SELECT @@have_dynamic_loading != 'YES'`) { + --skip Requires dynamic loading +} + +# +# Check if the variable SEMISYNC_MASTER_PLUGIN is set +# +if (`select LENGTH('$SEMISYNC_MASTER_PLUGIN') = 0`) +{ + skip Need semisync plugins; +} diff --git a/mysql-test/include/have_ssl_communication.inc b/mysql-test/include/have_ssl_communication.inc new file mode 100644 index 00000000000..6f2d5587a75 --- /dev/null +++ b/mysql-test/include/have_ssl_communication.inc @@ -0,0 +1,4 @@ +-- require r/have_ssl.require +disable_query_log; +show variables like 'have_ssl'; +enable_query_log; diff --git a/mysql-test/include/master-slave.inc b/mysql-test/include/master-slave.inc index e0eb87f02f7..25e0150dd0a 100644 --- a/mysql-test/include/master-slave.inc +++ b/mysql-test/include/master-slave.inc @@ -8,5 +8,7 @@ connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,); -- source include/master-slave-reset.inc +connection master; +sync_slave_with_master; # Set the default connection to 'master' connection master; diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index b99402c8031..2156c37f3e3 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -132,7 +132,7 @@ INSERT INTO global_suppressions VALUES ("Error in Log_event::read_log_event\\\(\\\): 'Sanity check failed', data_len: 258, event_type: 49"), - ("Statement is not safe to log in statement format"), + ("Statement may not be safe to log in statement format"), /* test case for Bug#bug29807 copies a stray frm into database */ ("InnoDB: Error: table `test`.`bug29807` does not exist in the InnoDB internal"), @@ -162,6 +162,8 @@ INSERT INTO global_suppressions VALUES ("Slave: Unknown column 'c7' in 't15' Error_code: 1054"), ("Slave: Can't DROP 'c7'.* 1091"), ("Slave: Key column 'c6'.* 1072"), + ("Slave I/O: The slave I/O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master."), + (".SELECT UNIX_TIMESTAMP... failed on master, do not trust column Seconds_Behind_Master of SHOW SLAVE STATUS"), /* Test case for Bug#31590 in order_by.test produces the following error */ ("Out of sort memory; increase server sort buffer size"), diff --git a/mysql-test/include/setup_fake_relay_log.inc b/mysql-test/include/setup_fake_relay_log.inc index f88806e1079..b11e6afbeca 100644 --- a/mysql-test/include/setup_fake_relay_log.inc +++ b/mysql-test/include/setup_fake_relay_log.inc @@ -69,7 +69,21 @@ let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`; # Create relay log file. copy_file $fake_relay_log $_fake_relay_log; # Create relay log index. ---exec echo $_fake_filename-fake.000001 > $_fake_relay_index + +# After patch for BUG#12190, the filename used in CHANGE MASTER +# RELAY_LOG_FILE will be automatically added the directory of the +# relay log before comparison, thus we need to added the directory +# part (./ on unix .\ on windows) when faking the relay-log-bin.index. + +if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`) +{ + eval select './$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index'; +} + +if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") != 0`) +{ + eval select '.\\\\$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index'; +} # 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; diff --git a/mysql-test/include/show_binlog_events.inc b/mysql-test/include/show_binlog_events.inc index 68f913a16a3..fcdc52eaf14 100644 --- a/mysql-test/include/show_binlog_events.inc +++ b/mysql-test/include/show_binlog_events.inc @@ -1,10 +1,35 @@ # $binlog_start can be set by caller or take a default value +# $binary_log_file the name of the log file show +# $binary_log_limit_row - sets the number of binlog rows to be returned +# $binary_log_limit_offset - sets the offset where to start returning events + +let $show_binlog_events= show binlog events; if (!$binlog_start) { - let $binlog_start=106; + # defaults to chop the first event in the binary log + let $binlog_start=107; } + +if (!`SELECT '$binary_log_file' = ''`) +{ + let $show_binlog_events= $show_binlog_events in '$binary_log_file'; +} +let $show_binlog_events= $show_binlog_events from $binlog_start; + +if ($binary_log_limit_row) +{ + let $limit= limit; + if ($binary_log_limit_offset) + { + let $limit= $limit $binary_log_limit_offset, ; + } + + let $limit= $limit $binary_log_limit_row; + let $show_binlog_events= $show_binlog_events $limit; +} + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start> --replace_column 2 # 4 # 5 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ ---eval show binlog events from $binlog_start +--eval $show_binlog_events diff --git a/mysql-test/include/show_binlog_events2.inc b/mysql-test/include/show_binlog_events2.inc index 5dd272c562d..0e1a889bacc 100644 --- a/mysql-test/include/show_binlog_events2.inc +++ b/mysql-test/include/show_binlog_events2.inc @@ -1,4 +1,4 @@ ---let $binlog_start=106 +--let $binlog_start=107 --replace_result $binlog_start <binlog_start> --replace_column 2 # 5 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ diff --git a/mysql-test/include/show_relaylog_events.inc b/mysql-test/include/show_relaylog_events.inc new file mode 100644 index 00000000000..6f63b055d58 --- /dev/null +++ b/mysql-test/include/show_relaylog_events.inc @@ -0,0 +1,35 @@ +# $binlog_start can be set by caller or take a default value +# $binary_log_file the name of the log file show +# $binary_log_limit_row - sets the number of binlog rows to be returned +# $binary_log_limit_offset - sets the offset where to start returning events + +let $show_binlog_events= show relaylog events; + +if (!$binlog_start) +{ + # defaults to chop the first event in the binary log + let $binlog_start=106; +} + +if (!`SELECT '$binary_log_file' = ''`) +{ + let $show_binlog_events= $show_binlog_events in '$binary_log_file'; +} +let $show_binlog_events= $show_binlog_events from $binlog_start; + +if ($binary_log_limit_row) +{ + let $limit= limit; + if ($binary_log_limit_offset) + { + let $limit= $limit $binary_log_limit_offset, ; + } + + let $limit= $limit $binary_log_limit_row; + let $show_binlog_events= $show_binlog_events $limit; +} + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start> +--replace_column 2 # 4 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /Server ver:.*$/SERVER_VERSION, BINLOG_VERSION/ +--eval $show_binlog_events diff --git a/mysql-test/include/test_fieldsize.inc b/mysql-test/include/test_fieldsize.inc index cbe63e26318..606bc63779d 100644 --- a/mysql-test/include/test_fieldsize.inc +++ b/mysql-test/include/test_fieldsize.inc @@ -22,7 +22,7 @@ eval $test_insert; connection slave; START SLAVE; -wait_for_slave_to_stop; +--source include/wait_for_slave_sql_to_stop.inc --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # --query_vertical SHOW SLAVE STATUS diff --git a/mysql-test/include/wait_until_disconnected.inc b/mysql-test/include/wait_until_disconnected.inc index a4362e52d01..8a989becc18 100644 --- a/mysql-test/include/wait_until_disconnected.inc +++ b/mysql-test/include/wait_until_disconnected.inc @@ -7,7 +7,7 @@ let $counter= 500; let $mysql_errno= 0; while (!$mysql_errno) { - --error 0,1053,2002,2006,2013 + --error 0,1040,1053,2002,2003,2006,2013 show status; dec $counter; |