Commit 91991c1e authored by Nirbhay Choubey's avatar Nirbhay Choubey

MDEV-7635: Test fixes

parent 3435e8a5
...@@ -346,7 +346,7 @@ if ($CRC_RET_stmt_sidef) { ...@@ -346,7 +346,7 @@ if ($CRC_RET_stmt_sidef) {
SHOW BINLOG EVENTS; SHOW BINLOG EVENTS;
--die Warnings printed --die Warnings printed
} }
--let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 5) --let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 6)
# The first event is format_description, the second is Gtid list, the # The first event is format_description, the second is Gtid list, the
# third is Binlog_checkpoint, the fourth Gtid, and the fifth should be # third is Binlog_checkpoint, the fourth Gtid, and the fifth should be
# our Query for 'INSERT DELAYED' unsafe_type 3, which is safe after # our Query for 'INSERT DELAYED' unsafe_type 3, which is safe after
...@@ -362,7 +362,7 @@ if ($CRC_RET_stmt_sidef) { ...@@ -362,7 +362,7 @@ if ($CRC_RET_stmt_sidef) {
# for unsafe statement. # for unsafe statement.
if (`SELECT $unsafe_type != 3 AND '$event_type' != 'Table_map'`) { if (`SELECT $unsafe_type != 3 AND '$event_type' != 'Table_map'`) {
--enable_query_log --enable_query_log
--echo ******** Failure! Event number 4 was a '$event_type', not a 'Table_map'. ******** --echo ******** Failure! Event number 6 was a '$event_type', not a 'Table_map'. ********
SHOW BINLOG EVENTS; SHOW BINLOG EVENTS;
--die Wrong events in binlog. --die Wrong events in binlog.
} }
......
...@@ -62,7 +62,7 @@ while ($ddl_cases >= 1) ...@@ -62,7 +62,7 @@ while ($ddl_cases >= 1)
# #
if (`select @@binlog_format = 'ROW'`) if (`select @@binlog_format = 'ROW'`)
{ {
let $commit_event_row_number= 4; let $commit_event_row_number= 5;
} }
let $first_binlog_position= query_get_value("SHOW MASTER STATUS", Position, 1); let $first_binlog_position= query_get_value("SHOW MASTER STATUS", Position, 1);
...@@ -164,7 +164,7 @@ while ($ddl_cases >= 1) ...@@ -164,7 +164,7 @@ while ($ddl_cases >= 1)
# #
if (`select @@binlog_format = 'ROW'`) if (`select @@binlog_format = 'ROW'`)
{ {
let $commit_event_row_number= 5; let $commit_event_row_number= 6;
} }
} }
if ($ddl_cases == 22) if ($ddl_cases == 22)
...@@ -250,7 +250,7 @@ while ($ddl_cases >= 1) ...@@ -250,7 +250,7 @@ while ($ddl_cases >= 1)
# #
if (`select @@binlog_format = 'MIXED'`) if (`select @@binlog_format = 'MIXED'`)
{ {
let $commit_event_row_number= 4; let $commit_event_row_number= 5;
} }
} }
if ($ddl_cases == 9) if ($ddl_cases == 9)
...@@ -267,7 +267,7 @@ while ($ddl_cases >= 1) ...@@ -267,7 +267,7 @@ while ($ddl_cases >= 1)
# #
if (`select @@binlog_format = 'MIXED'`) if (`select @@binlog_format = 'MIXED'`)
{ {
let $commit_event_row_number= 4; let $commit_event_row_number= 5;
} }
} }
if ($ddl_cases == 8) if ($ddl_cases == 8)
...@@ -293,10 +293,14 @@ while ($ddl_cases >= 1) ...@@ -293,10 +293,14 @@ while ($ddl_cases >= 1)
# 3: ROW EVENT # 3: ROW EVENT
# 4: COMMIT # 4: COMMIT
# #
if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'ROW'`) if (`select @@binlog_format = 'STATEMENT'`)
{ {
let $commit_event_row_number= 4; let $commit_event_row_number= 4;
} }
if (`select @@binlog_format = 'ROW'`)
{
let $commit_event_row_number= 5;
}
# In MIXED mode, the changes are logged as rows and we have what follows: # In MIXED mode, the changes are logged as rows and we have what follows:
# #
# 1: BEGIN # 1: BEGIN
...@@ -307,7 +311,7 @@ while ($ddl_cases >= 1) ...@@ -307,7 +311,7 @@ while ($ddl_cases >= 1)
# #
if (`select @@binlog_format = 'MIXED'`) if (`select @@binlog_format = 'MIXED'`)
{ {
let $commit_event_row_number= 5; let $commit_event_row_number= 6;
} }
} }
if ($ddl_cases == 7) if ($ddl_cases == 7)
......
...@@ -2521,6 +2521,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# ...@@ -2521,6 +2521,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT DELAYED INTO t1 VALUES (1), (2) master-bin.000001 # Query # # use `test`; INSERT DELAYED INTO t1 VALUES (1), (2)
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO t1 SELECT * FROM t2 LIMIT 1
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
...@@ -2548,6 +2549,7 @@ INSERT INTO t2 SET a = func_modify_t1(); ...@@ -2548,6 +2549,7 @@ INSERT INTO t2 SET a = func_modify_t1();
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO t1 SET a = 1
master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: #
...@@ -2575,10 +2577,12 @@ INSERT INTO t1 SET a = 2; ...@@ -2575,10 +2577,12 @@ INSERT INTO t1 SET a = 2;
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # insert into t2(a) values(new.a)
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t3)
master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Annotate_rows # # insert into t3(a) values(new.a)
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t3)
master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t2)
......
...@@ -488,6 +488,7 @@ ALTER TABLE tt_xx ADD COLUMN (b int); ...@@ -488,6 +488,7 @@ ALTER TABLE tt_xx ADD COLUMN (b int);
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (10)
master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Table_map # # table_id: # (test.tt_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
...@@ -501,6 +502,7 @@ ALTER TABLE tt_xx RENAME new_tt_xx; ...@@ -501,6 +502,7 @@ ALTER TABLE tt_xx RENAME new_tt_xx;
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (9)
master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Table_map # # table_id: # (test.tt_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
...@@ -514,6 +516,7 @@ DROP TEMPORARY TABLE IF EXISTS new_tt_xx; ...@@ -514,6 +516,7 @@ DROP TEMPORARY TABLE IF EXISTS new_tt_xx;
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (8)
master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Table_map # # table_id: # (test.tt_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`new_tt_xx` /* generated by server */ master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`new_tt_xx` /* generated by server */
......
...@@ -88,4 +88,6 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads; ...@@ -88,4 +88,6 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc include/start_slave.inc
connection server_1; connection server_1;
DROP TABLE t1, t2; DROP TABLE t1, t2;
connection server_2;
call mtr.add_suppression("Deadlock found when trying to get lock.*");
include/rpl_end.inc include/rpl_end.inc
...@@ -70,5 +70,8 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads; ...@@ -70,5 +70,8 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads;
--connection server_1 --connection server_1
DROP TABLE t1, t2; DROP TABLE t1, t2;
--connection server_2
call mtr.add_suppression("Deadlock found when trying to get lock.*");
--source include/rpl_end.inc --source include/rpl_end.inc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment