mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-12179: Per-engine mysql.gtid_slave_pos table
Intermediate commit. Move the discovery of mysql.gtid_slave_pos* tables into the SQL thread. This avoids doing things like opening tables and scanning the mysql schema for tables inside of the START SLAVE statement, which might interact badly with existing transaction or table locks. (Even though START SLAVE is documented to implicitly commit any active transactions, this appears not to be the case in current code). Table discovery fits naturally in the SQL thread init code, next to the loading of mysql.gtid_slave_pos state.
This commit is contained in:
@@ -8,22 +8,26 @@ connection slave;
|
||||
include/stop_slave.inc
|
||||
ALTER TABLE mysql.gtid_slave_pos CHANGE seq_no seq_no VARCHAR(20);
|
||||
START SLAVE;
|
||||
ERROR HY000: Failed to open mysql.gtid_slave_pos
|
||||
connection master;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection slave;
|
||||
CALL mtr.add_suppression("Incorrect definition of table mysql.gtid_slave_pos");
|
||||
CALL mtr.add_suppression("Slave: Failed to open mysql.gtid_slave_pos");
|
||||
include/wait_for_slave_sql_error.inc [errno=1944]
|
||||
include/stop_slave.inc
|
||||
ALTER TABLE mysql.gtid_slave_pos CHANGE seq_no seq_no BIGINT UNSIGNED NOT NULL;
|
||||
ALTER TABLE mysql.gtid_slave_pos DROP PRIMARY KEY;
|
||||
ALTER TABLE mysql.gtid_slave_pos ADD PRIMARY KEY (sub_id, domain_id);
|
||||
START SLAVE;
|
||||
ERROR HY000: Failed to open mysql.gtid_slave_pos
|
||||
include/wait_for_slave_sql_error.inc [errno=1944]
|
||||
include/stop_slave.inc
|
||||
ALTER TABLE mysql.gtid_slave_pos DROP PRIMARY KEY;
|
||||
START SLAVE;
|
||||
ERROR HY000: Failed to open mysql.gtid_slave_pos
|
||||
include/wait_for_slave_sql_error.inc [errno=1944]
|
||||
include/stop_slave.inc
|
||||
ALTER TABLE mysql.gtid_slave_pos ADD PRIMARY KEY (sub_id);
|
||||
START SLAVE;
|
||||
ERROR HY000: Failed to open mysql.gtid_slave_pos
|
||||
include/wait_for_slave_sql_error.inc [errno=1944]
|
||||
include/stop_slave.inc
|
||||
ALTER TABLE mysql.gtid_slave_pos DROP PRIMARY KEY;
|
||||
ALTER TABLE mysql.gtid_slave_pos ADD PRIMARY KEY (domain_id, sub_id);
|
||||
include/start_slave.inc
|
||||
|
Reference in New Issue
Block a user