mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge branch '10.1' into 10.2
This commit is contained in:
@ -484,10 +484,69 @@ SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
|
||||
SELECT * FROM t1 WHERE a >= 40 ORDER BY a;
|
||||
SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
|
||||
|
||||
# Clean up.
|
||||
# partial cleanup to reuse the tables by following tests
|
||||
--connection server_1
|
||||
DELETE FROM t1;
|
||||
DELETE FROM t2;
|
||||
--source include/save_master_gtid.inc
|
||||
|
||||
--connection server_2
|
||||
--source include/sync_with_master_gtid.inc
|
||||
|
||||
#
|
||||
# MDEV-13577 optimistic parallel slave errors out to error log unnecessary
|
||||
#
|
||||
|
||||
# The 1st of the following two trx:s a blocker on slave
|
||||
--connection server_2
|
||||
set global log_warnings=2;
|
||||
BEGIN;
|
||||
INSERT INTO t1 SET a=1;
|
||||
|
||||
--connection server_1
|
||||
SET @save.binlog_format=@@session.binlog_format;
|
||||
SET @@SESSION.binlog_format=row;
|
||||
|
||||
BEGIN;
|
||||
INSERT INTO t1 SET a=1;
|
||||
INSERT INTO t2 SET a=1;
|
||||
COMMIT;
|
||||
|
||||
# This transaction is going to win optimistical race with above INSERT
|
||||
# on slave while being depend on it. That means it will face a kind of temporary error
|
||||
# and then will retry to succeed.
|
||||
BEGIN;
|
||||
DELETE FROM t2;
|
||||
COMMIT;
|
||||
|
||||
# First make sure DELETE raced indeed to get stuck at retrying stage
|
||||
# where it runs "realistically" now. There is nomore optimistic error
|
||||
# in the errorlog, which is downgraded to the warning level (when
|
||||
# --log-warnings > 1), see above suppression.
|
||||
--connection server_2
|
||||
--let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist WHERE state = "Waiting for prior transaction to commit"
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# Next release the 1st trx to commit.
|
||||
--connection server_2
|
||||
ROLLBACK;
|
||||
|
||||
# MDEV-13577 local cleanup:
|
||||
--connection server_1
|
||||
SET @@SESSION.binlog_format= @save.binlog_format;
|
||||
DELETE FROM t1;
|
||||
DELETE FROM t2;
|
||||
--source include/save_master_gtid.inc
|
||||
|
||||
--connection server_2
|
||||
--source include/sync_with_master_gtid.inc
|
||||
|
||||
#
|
||||
# Clean up.
|
||||
#
|
||||
--connection server_2
|
||||
--source include/stop_slave.inc
|
||||
set global log_warnings=default;
|
||||
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
|
||||
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
|
||||
--source include/start_slave.inc
|
||||
|
Reference in New Issue
Block a user