summaryrefslogtreecommitdiff
path: root/mysql-test/extra/rpl_tests
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-03-26 10:35:34 +0100
committerunknown <knielsen@knielsen-hq.org>2013-03-26 10:35:34 +0100
commitd9f975d08bc4480109b172e1f9c3799a375c238d (patch)
treed3a2b8fca828d150b3b25b6b688b979f6336f355 /mysql-test/extra/rpl_tests
parenta3f651d0f635df1a29d152c7088150b3ba144b72 (diff)
downloadmariadb-git-d9f975d08bc4480109b172e1f9c3799a375c238d.tar.gz
MDEV-26: Global transaction ID
Adjust full test suite to work with GTID. Huge patch, mainly due to having to update .result file for all SHOW BINLOG EVENTS and mysqlbinlog outputs, where the new GTID events pop up. Everything was painstakingly checked to be still correct and valid .result file updates.
Diffstat (limited to 'mysql-test/extra/rpl_tests')
-rw-r--r--mysql-test/extra/rpl_tests/create_recursive_construct.inc14
-rw-r--r--mysql-test/extra/rpl_tests/rpl_deadlock.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_insert_delayed.test5
-rw-r--r--mysql-test/extra/rpl_tests/rpl_log.test6
-rw-r--r--mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc4
5 files changed, 17 insertions, 14 deletions
diff --git a/mysql-test/extra/rpl_tests/create_recursive_construct.inc b/mysql-test/extra/rpl_tests/create_recursive_construct.inc
index e790a1db41f..67d0311fb72 100644
--- a/mysql-test/extra/rpl_tests/create_recursive_construct.inc
+++ b/mysql-test/extra/rpl_tests/create_recursive_construct.inc
@@ -325,8 +325,8 @@ if ($CRC_RET_stmt_sidef) {
SHOW BINLOG EVENTS;
--die Wrong number of warnings.
}
- # There should be no events after format description and binlog checkpoint.
- --let $binlog_event= query_get_value(SHOW BINLOG EVENTS, Event_type, 3)
+ # There should be no events after format description, Gtid list, and binlog checkpoint.
+ --let $binlog_event= query_get_value(SHOW BINLOG EVENTS, Event_type, 4)
if ($binlog_event != No such row) {
--enable_query_log
--echo ******** Failure! Something was written to the binlog despite SQL_LOG_BIN=0 ********
@@ -346,14 +346,14 @@ if ($CRC_RET_stmt_sidef) {
SHOW BINLOG EVENTS;
--die Warnings printed
}
- --let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 4)
- # The first event is format_description, the second is Binlog_checkpoint,
- # the third Query_event('BEGIN'), and the fourth should be our Query
- # for 'INSERT DELAYED' unsafe_type 3, which is safe after
+ --let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 5)
+ # The first event is format_description, the second is Gtid list, the
+ # third is Binlog_checkpoint, the fourth Gtid, and the fifth should be
+ # our Query for 'INSERT DELAYED' unsafe_type 3, which is safe after
# the fix of bug#54579.
if (`SELECT $unsafe_type = 3 AND '$event_type' != 'Query'`) {
--enable_query_log
- --echo ******** Failure! Event number 4 was a '$event_type', not a 'Query'. ********
+ --echo ******** Failure! Event number 5 was a '$event_type', not a 'Query'. ********
SHOW BINLOG EVENTS;
--die Wrong events in binlog.
}
diff --git a/mysql-test/extra/rpl_tests/rpl_deadlock.test b/mysql-test/extra/rpl_tests/rpl_deadlock.test
index 56ff4683df8..f7a1e71d5d9 100644
--- a/mysql-test/extra/rpl_tests/rpl_deadlock.test
+++ b/mysql-test/extra/rpl_tests/rpl_deadlock.test
@@ -34,7 +34,7 @@ INSERT INTO t3 VALUES (3);
COMMIT;
save_master_pos;
# Save BEGIN event into variable
-let $master_pos_begin= query_get_value(SHOW BINLOG EVENTS, Pos, 6);
+let $master_pos_begin= query_get_value(SHOW BINLOG EVENTS, Pos, 10);
--echo
# 1) Test deadlock
diff --git a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test
index 3d7d3600199..1a9c4a1163c 100644
--- a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test
+++ b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test
@@ -137,7 +137,10 @@ if (`SELECT @@global.binlog_format = 'STATEMENT'`)
{
#must show two INSERT DELAYED
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
- --let $binlog_limit= 2,6
+ # The show_binlog_events.inc already skips format_description, gtid list, and
+ # one binlog checkpoint events. Skip three more, second binlog checkpoint,
+ # Gtid, and CREATE TABLE, so we start at the first DML event
+ --let $binlog_limit= 3,6
--source include/show_binlog_events.inc
}
select * from t1;
diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test
index 961996bb265..deff9d653e0 100644
--- a/mysql-test/extra/rpl_tests/rpl_log.test
+++ b/mysql-test/extra/rpl_tests/rpl_log.test
@@ -33,13 +33,13 @@ eval load data infile '$LOAD_FILE' into table t1 ignore 1 lines;
select count(*) from t1;
source include/show_binlog_events.inc;
-let $binlog_limit= 1;
+let $binlog_limit= 2;
source include/show_binlog_events.inc;
-let $binlog_limit= 2;
+let $binlog_limit= 3;
source include/show_binlog_events.inc;
-let $binlog_limit= 1,4;
+let $binlog_limit= 2,4;
source include/show_binlog_events.inc;
let $binlog_limit=;
flush logs;
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
index 411f388aaf3..4e68a1560f8 100644
--- 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
@@ -2,9 +2,9 @@
--let $binlog_limit=
--source extra/rpl_tests/rpl_show_binlog_events.inc
---let $binlog_limit= 1
+--let $binlog_limit= 2
--source extra/rpl_tests/rpl_show_binlog_events.inc
---let $binlog_limit= 1,3
+--let $binlog_limit= 2,3
--source extra/rpl_tests/rpl_show_binlog_events.inc
--let $binlog_limit=
--let $binlog_file=