mirror of
https://github.com/MariaDB/server.git
synced 2026-02-22 10:38:40 +01:00
The initial scanning of the GTID pos table in find_gtid_pos_tables_cb() used
the wrong call to commit the transaction, ha_commit_trans(thd, TRUE) instead
of trans_commit(thd). This could cause an assertion
Assertion '!thd->in_active_multi_stmt_transaction() || thd->in_multi_stmt_transaction_mode()' failed in mysql_execute_command
and possibly other issues due to incorrect state in the SQL thread THD.
Similar problem in rpl_slave_state::truncate_state_table() also fixed.
Note there is a sister patch cd88b0831f
which applied this same pattern which fixed a hang due to locks
not being released in the ha_commit_trans(thd, TRUE) call.
Test-case-by: Alice Sherepa <alice.sherepa@gmail.com>
Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
27 lines
645 B
Text
27 lines
645 B
Text
--source include/have_innodb.inc
|
|
--let $rpl_topology=1->2
|
|
--source include/rpl_init.inc
|
|
|
|
--connection server_1
|
|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
|
--save_master_pos
|
|
|
|
--connection server_2
|
|
--sync_with_master
|
|
--source include/stop_slave.inc
|
|
|
|
--connection server_1
|
|
CREATE TABLE t1 (a INT);
|
|
|
|
--connection server_2
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
|
|
MASTER_USE_GTID=CURRENT_POS;
|
|
--source include/start_slave.inc
|
|
|
|
--connection server_2
|
|
--source include/sync_with_master_gtid.inc
|
|
|
|
--connection server_1
|
|
DROP TABLE t1;
|
|
--source include/rpl_end.inc
|