mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-25502: rpl.rpl_perfschema_applier_status_by_worker failed in bb with: Test assertion failed
Problem: ======= Test assertion fails on slave. Assertion text: 'Last_Seen_Transaction should show .' Assertion condition: '"0-1-1" = ""' Assertion condition, interpolated: '"0-1-1" = ""' Assertion result: '0' Analysis: ======== Test case creates a table on master and it waits for it to be replicated to slave and applied by slave applier. On completion 'Last_Seen_Transaction' value from 'performance_schema.replication_applier_status_by_worker' table is compared with '@@gtid_slave_pos' to ensure its correctness. The test should ensure that user table and 'gtid_slave_pos' table are of same engine type 'InnoDB' to get consistent test results. This guarantees that 'gtid_slave_pos' table is updated as part of transaction commit. In the of such an engine consistency, user table gets created in default MyISAM storage engine and 'mysql.gtid_slave_pos' table gets created in Aria storage engine. When the test code reaches above assert there might be a delay in an update to 'gtid_slave_pos' table, which leads to test assertion failure. Fix: === Use InnoDB engine for both user table and 'mysql.gtid_slave_pos' table.
This commit is contained in:
@@ -13,6 +13,7 @@ RESET SLAVE ALL;
|
|||||||
CHANGE MASTER 'slave1' TO MASTER_USER='root',MASTER_PORT=$MASTER_MYPORT, MASTER_HOST='127.0.0.1', MASTER_USE_GTID=slave_pos;
|
CHANGE MASTER 'slave1' TO MASTER_USER='root',MASTER_PORT=$MASTER_MYPORT, MASTER_HOST='127.0.0.1', MASTER_USE_GTID=slave_pos;
|
||||||
SET default_master_connection='slave1';
|
SET default_master_connection='slave1';
|
||||||
SET @@global.slave_parallel_workers=1;
|
SET @@global.slave_parallel_workers=1;
|
||||||
|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||||
START SLAVE 'slave1';
|
START SLAVE 'slave1';
|
||||||
include/wait_for_slave_to_start.inc
|
include/wait_for_slave_to_start.inc
|
||||||
include/assert.inc [Channel_name will be empty for a worker when it has not processed any transaction]
|
include/assert.inc [Channel_name will be empty for a worker when it has not processed any transaction]
|
||||||
@@ -20,7 +21,7 @@ include/assert.inc [thread_name should should indicate worker thread.]
|
|||||||
include/assert.inc [Service_State should be "ON" on a fresh slave server.]
|
include/assert.inc [Service_State should be "ON" on a fresh slave server.]
|
||||||
include/assert.inc [Last_Seen_Transaction should show "" if no transaction applierd]
|
include/assert.inc [Last_Seen_Transaction should show "" if no transaction applierd]
|
||||||
connection master;
|
connection master;
|
||||||
CREATE TABLE t1 (a INT);
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
connection slave;
|
connection slave;
|
||||||
include/assert.inc [Channel_name must be slave1]
|
include/assert.inc [Channel_name must be slave1]
|
||||||
include/assert.inc [Last_Seen_Transaction should show 0-1-1.]
|
include/assert.inc [Last_Seen_Transaction should show 0-1-1.]
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
--source include/have_perfschema.inc
|
|
||||||
# ==== Purpose ====
|
# ==== Purpose ====
|
||||||
#
|
#
|
||||||
# This test script serves as the functionality testing for the table
|
# This test script serves as the functionality testing for the table
|
||||||
@@ -33,7 +32,9 @@
|
|||||||
#
|
#
|
||||||
# MDEV-20220: Merge 5.7 P_S replication table 'replication_applier_status_by_worker
|
# MDEV-20220: Merge 5.7 P_S replication table 'replication_applier_status_by_worker
|
||||||
#
|
#
|
||||||
|
--source include/have_perfschema.inc
|
||||||
--source include/have_binlog_format_mixed.inc
|
--source include/have_binlog_format_mixed.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
|
||||||
@@ -54,6 +55,7 @@ RESET SLAVE ALL;
|
|||||||
evalp CHANGE MASTER 'slave1' TO MASTER_USER='root',MASTER_PORT=$MASTER_MYPORT, MASTER_HOST='127.0.0.1', MASTER_USE_GTID=slave_pos;
|
evalp CHANGE MASTER 'slave1' TO MASTER_USER='root',MASTER_PORT=$MASTER_MYPORT, MASTER_HOST='127.0.0.1', MASTER_USE_GTID=slave_pos;
|
||||||
SET default_master_connection='slave1';
|
SET default_master_connection='slave1';
|
||||||
SET @@global.slave_parallel_workers=1;
|
SET @@global.slave_parallel_workers=1;
|
||||||
|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||||
START SLAVE 'slave1';
|
START SLAVE 'slave1';
|
||||||
--source include/wait_for_slave_to_start.inc
|
--source include/wait_for_slave_to_start.inc
|
||||||
|
|
||||||
@@ -80,7 +82,7 @@ let $assert_cond= "$ps_value" = "";
|
|||||||
source include/assert.inc;
|
source include/assert.inc;
|
||||||
|
|
||||||
--connection master
|
--connection master
|
||||||
CREATE TABLE t1 (a INT);
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
--save_master_pos
|
--save_master_pos
|
||||||
|
|
||||||
--connection slave
|
--connection slave
|
||||||
|
Reference in New Issue
Block a user