mirror of
https://github.com/MariaDB/server.git
synced 2025-12-06 05:42:06 +03:00
Galera4
This commit is contained in:
committed by
Sergey Vojtovich
parent
382115b992
commit
36a2a185fe
70
mysql-test/suite/galera_sr/r/GCF-1008.result
Normal file
70
mysql-test/suite/galera_sr/r/GCF-1008.result
Normal file
@@ -0,0 +1,70 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 'x');
|
||||
connection node_2a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,before_local_commit_monitor_enter';
|
||||
connection node_2;
|
||||
COMMIT;
|
||||
connection node_2b;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
REPLACE INTO t1 VALUES (1,'y');
|
||||
connection node_2b;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2a;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=before_local_commit_monitor_enter';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 'x');
|
||||
connection node_2a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,before_certify_apply_monitor_enter';
|
||||
connection node_2;
|
||||
COMMIT;
|
||||
connection node_2b;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
REPLACE INTO t1 VALUES (1,'y');
|
||||
connection node_2b;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2a;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=before_certify_apply_monitor_enter';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
24
mysql-test/suite/galera_sr/r/GCF-1018.result
Normal file
24
mysql-test/suite/galera_sr/r/GCF-1018.result
Normal file
@@ -0,0 +1,24 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 (f2) VALUES ('a');
|
||||
INSERT INTO t1 (f2) VALUES ('b');
|
||||
INSERT INTO t1 (f2) VALUES ('c');
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,after_certify_apply_monitor_enter';
|
||||
connection node_2;
|
||||
SET SESSION wsrep_trx_fragment_size = 64;
|
||||
DELETE FROM t1 ORDER BY f1 DESC LIMIT 2;;
|
||||
connection node_2a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
connection node_1;
|
||||
INSERT INTO t1 (f2) VALUES ('d'),('e');
|
||||
connection node_2a;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=after_certify_apply_monitor_enter';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_2;
|
||||
Got one of the listed errors
|
||||
DROP TABLE t1;
|
||||
12
mysql-test/suite/galera_sr/r/GCF-1018B.result
Normal file
12
mysql-test/suite/galera_sr/r/GCF-1018B.result
Normal file
@@ -0,0 +1,12 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 64;
|
||||
SET SESSION innodb_lock_wait_timeout = 1000;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 64;
|
||||
SET SESSION innodb_lock_wait_timeout = 1000;
|
||||
DROP TABLE t1;
|
||||
21
mysql-test/suite/galera_sr/r/GCF-1043A.result
Normal file
21
mysql-test/suite/galera_sr/r/GCF-1043A.result
Normal file
@@ -0,0 +1,21 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
Running a concurrent test with the following queries:
|
||||
DELETE FROM t1
|
||||
REPLACE INTO t1 VALUES (1,'y'),(2,'x')
|
||||
REPLACE INTO t1 VALUES (1,'y'),(2,'y'),(3,'y')
|
||||
connection node_1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
include/diff_servers.inc [servers=1 2]
|
||||
DROP TABLE t1;
|
||||
Concurrent test end
|
||||
21
mysql-test/suite/galera_sr/r/GCF-1043B.result
Normal file
21
mysql-test/suite/galera_sr/r/GCF-1043B.result
Normal file
@@ -0,0 +1,21 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
Running a concurrent test with the following queries:
|
||||
DELETE FROM t1
|
||||
INSERT INTO t1 VALUES (1,'y'),(2,'x')
|
||||
UPDATE t1 SET f2 = 'y' WHERE f1 = 1 OR f1 = 2;
|
||||
connection node_1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
include/diff_servers.inc [servers=1 2]
|
||||
DROP TABLE t1;
|
||||
Concurrent test end
|
||||
46
mysql-test/suite/galera_sr/r/GCF-1051.result
Normal file
46
mysql-test/suite/galera_sr/r/GCF-1051.result
Normal file
@@ -0,0 +1,46 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size=1;
|
||||
connection node_1;
|
||||
START TRANSACTION;
|
||||
SAVEPOINT A;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
ROLLBACK TO SAVEPOINT A;
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SAVEPOINT A;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
ROLLBACK TO SAVEPOINT A;
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
21
mysql-test/suite/galera_sr/r/GCF-1060.result
Normal file
21
mysql-test/suite/galera_sr/r/GCF-1060.result
Normal file
@@ -0,0 +1,21 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
Running a concurrent test with the following queries:
|
||||
TRUNCATE TABLE t1
|
||||
INSERT INTO t1 VALUE (1,'x'),(2,'x'),(3,'x')
|
||||
INSERT INTO t1 VALUE (4, 'z');
|
||||
connection node_1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
include/diff_servers.inc [servers=1 2]
|
||||
DROP TABLE t1;
|
||||
Concurrent test end
|
||||
12
mysql-test/suite/galera_sr/r/GCF-437.result
Normal file
12
mysql-test/suite/galera_sr/r/GCF-437.result
Normal file
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE ten (f1 INTEGER) ENGINE=MyISAM;
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 2 * 1024 * 1024;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
|
||||
ERROR HY000: Writing one row to the row-based binary log failed
|
||||
CALL mtr.add_suppression("InnoDB: The total blob data length*");
|
||||
CALL mtr.add_suppression("WSREP: Error writing into mysql.wsrep_streaming_log: 139");
|
||||
CALL mtr.add_suppression("WSREP: Failed to write to frag table: 1");
|
||||
CALL mtr.add_suppression("WSREP: Failed to append frag to persistent storage");
|
||||
DROP TABLE t1;
|
||||
DROP table ten;
|
||||
50
mysql-test/suite/galera_sr/r/GCF-561.result
Normal file
50
mysql-test/suite/galera_sr/r/GCF-561.result
Normal file
@@ -0,0 +1,50 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 1);
|
||||
INSERT INTO t1 VALUES (2, 2);
|
||||
INSERT INTO t1 VALUES (3, 3);
|
||||
INSERT INTO t1 VALUES (4, 4);
|
||||
INSERT INTO t1 VALUES (5, 5);
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
ALTER TABLE t1 DROP COLUMN f2;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (6, 6);
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
INSERT INTO t1 VALUES (6, 6);
|
||||
ERROR 21S01: Column count doesn't match value count at row 1
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
67
mysql-test/suite/galera_sr/r/GCF-571.result
Normal file
67
mysql-test/suite/galera_sr/r/GCF-571.result
Normal file
@@ -0,0 +1,67 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('%abcdef%');
|
||||
INSERT INTO t1 VALUES ('%abcdef%');
|
||||
INSERT INTO t1 VALUES ('%abcdef%');
|
||||
INSERT INTO t1 VALUES ('%abcdef%');
|
||||
SAVEPOINT A;
|
||||
INSERT INTO t1 VALUES ('xyzxyz');
|
||||
INSERT INTO t1 VALUES ('xyzxyz');
|
||||
INSERT INTO t1 VALUES ('xyzxyz');
|
||||
INSERT INTO t1 VALUES ('xyzxyz');
|
||||
INSERT INTO t1 VALUES ('xyzxyz');
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1a;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
|
||||
COUNT(*) > 0
|
||||
1
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
|
||||
COUNT(*) > 0
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
|
||||
COUNT(*) = 1
|
||||
0
|
||||
connection node_1;
|
||||
ROLLBACK TO SAVEPOINT A;
|
||||
connection node_1a;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
|
||||
COUNT(*) > 0
|
||||
1
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
|
||||
COUNT(*) > 0
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
|
||||
COUNT(*) = 1
|
||||
0
|
||||
SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%ROLLBACK TO `A`%';
|
||||
COUNT(*) = 1
|
||||
0
|
||||
connection node_2;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
|
||||
COUNT(*) > 0
|
||||
1
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
|
||||
COUNT(*) > 0
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
|
||||
COUNT(*) = 1
|
||||
0
|
||||
SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%ROLLBACK TO `A`%';
|
||||
COUNT(*) = 1
|
||||
0
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
connection node_1a;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
37
mysql-test/suite/galera_sr/r/GCF-572.result
Normal file
37
mysql-test/suite/galera_sr/r/GCF-572.result
Normal file
@@ -0,0 +1,37 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(10)) ENGINE=InnoDB;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 'node1');
|
||||
connection node_1a;
|
||||
INSERT INTO t1 VALUES (5, 'node2');
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (5, 'node1');
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
5 node2
|
||||
SET SESSION wsrep_trx_fragment_size = 10000;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUE (10, 'node1');
|
||||
SELECT * FROM mysql.wsrep_streaming_log;
|
||||
node_uuid trx_id seqno flags frag
|
||||
connection node_1a;
|
||||
INSERT INTO t1 VALUES(15, 'node2');
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
5 node2
|
||||
10 node1
|
||||
INSERT INTO t1 VALUES(15, 'node1');
|
||||
ERROR 23000: Duplicate entry '15' for key 'PRIMARY'
|
||||
COMMIT;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
5 node2
|
||||
10 node1
|
||||
15 node2
|
||||
DROP TABLE t1;
|
||||
11
mysql-test/suite/galera_sr/r/GCF-574.result
Normal file
11
mysql-test/suite/galera_sr/r/GCF-574.result
Normal file
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
|
||||
wsrep_last_committed_delta
|
||||
1
|
||||
SELECT COUNT(*) = 10000 FROM t1;
|
||||
COUNT(*) = 10000
|
||||
1
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
||||
13
mysql-test/suite/galera_sr/r/GCF-580.result
Normal file
13
mysql-test/suite/galera_sr/r/GCF-580.result
Normal file
@@ -0,0 +1,13 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
last_committed_matches_fragment_count
|
||||
1
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
28
mysql-test/suite/galera_sr/r/GCF-585.result
Normal file
28
mysql-test/suite/galera_sr/r/GCF-585.result
Normal file
@@ -0,0 +1,28 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
create table t1 (f1 integer primary key) engine=innodb;
|
||||
set autocommit=off;
|
||||
set session wsrep_trx_fragment_size=1;
|
||||
start transaction;
|
||||
insert into t1 values (1);
|
||||
insert into t1 values (2),(1);
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
alter table t1 drop primary key;
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
||||
SET SESSION wsrep_trx_fragment_size=1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
update t1 set f1 = 100 where f1 = 10;
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
|
||||
SET SESSION wsrep_trx_fragment_size=1;
|
||||
SET SESSION innodb_lock_wait_timeout=1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
delete from t1 where f1 > 10;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
delete from t1 where f1 > 10 and f1 < 100;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
DROP TABLE t1;
|
||||
21
mysql-test/suite/galera_sr/r/GCF-597.result
Normal file
21
mysql-test/suite/galera_sr/r/GCF-597.result
Normal file
@@ -0,0 +1,21 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
SET wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
ROLLBACK;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
DROP TABLE t1;
|
||||
18
mysql-test/suite/galera_sr/r/GCF-620.result
Normal file
18
mysql-test/suite/galera_sr/r/GCF-620.result
Normal file
@@ -0,0 +1,18 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SET SESSION wsrep_trx_fragment_size = 200;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SAVEPOINT A;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
ROLLBACK TO SAVEPOINT A;
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 2 FROM t1;
|
||||
COUNT(*) = 2
|
||||
0
|
||||
DROP TABLE t1;
|
||||
29
mysql-test/suite/galera_sr/r/GCF-623.result
Normal file
29
mysql-test/suite/galera_sr/r/GCF-623.result
Normal file
@@ -0,0 +1,29 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
26
mysql-test/suite/galera_sr/r/GCF-627.result
Normal file
26
mysql-test/suite/galera_sr/r/GCF-627.result
Normal file
@@ -0,0 +1,26 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (f1 INTEGER);
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 'a');
|
||||
connection node_2;
|
||||
DROP TABLE t1;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t2;
|
||||
21
mysql-test/suite/galera_sr/r/GCF-845.result
Normal file
21
mysql-test/suite/galera_sr/r/GCF-845.result
Normal file
@@ -0,0 +1,21 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE IF NOT EXISTS t1 (f1 INTEGER) ENGINE = InnoDB;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1a;
|
||||
SET SESSION AUTOCOMMIT=OFF;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (161);
|
||||
COMMIT;
|
||||
DELETE FROM t1 WHERE f1 > 13;
|
||||
disconnect node_1a;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
include/assert_grep.inc [No BF-BF log line found]
|
||||
30
mysql-test/suite/galera_sr/r/GCF-851.result
Normal file
30
mysql-test/suite/galera_sr/r/GCF-851.result
Normal file
@@ -0,0 +1,30 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION WSREP_TRX_FRAGMENT_SIZE=1;
|
||||
SET SESSION AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (10);
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
connection node_1;
|
||||
START TRANSACTION;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) > 0 FROM t1;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) > 0 FROM t1;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
4
mysql-test/suite/galera_sr/r/GCF-867.result
Normal file
4
mysql-test/suite/galera_sr/r/GCF-867.result
Normal file
@@ -0,0 +1,4 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
|
||||
DROP TABLE t1;
|
||||
25
mysql-test/suite/galera_sr/r/GCF-889.result
Normal file
25
mysql-test/suite/galera_sr/r/GCF-889.result
Normal file
@@ -0,0 +1,25 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_ignore_apply_errors = 2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_on = OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SET SESSION wsrep_on = ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
DELETE FROM t1 WHERE f1 = 1;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT COUNT(*) = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
CALL mtr.add_suppression("Could not execute Delete_rows event on table");
|
||||
CALL mtr.add_suppression("Can't find record in 't1'");
|
||||
SET GLOBAL wsrep_ignore_apply_errors = 7;
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
21
mysql-test/suite/galera_sr/r/GCF-900.result
Normal file
21
mysql-test/suite/galera_sr/r/GCF-900.result
Normal file
@@ -0,0 +1,21 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 128;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 0);
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (2, 0);
|
||||
connection node_2;
|
||||
ALTER TABLE t1 DROP COLUMN f2;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
connection node_1a;
|
||||
INSERT INTO t1 VALUES (3, 0);
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
DROP TABLE t1;
|
||||
32
mysql-test/suite/galera_sr/r/galera-features#56.result
Normal file
32
mysql-test/suite/galera_sr/r/galera-features#56.result
Normal file
@@ -0,0 +1,32 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
connection node_1;
|
||||
CREATE TABLE ten (f1 INTEGER);
|
||||
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
||||
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_slave_threads = 4;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
connection node_1;
|
||||
INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
|
||||
connection node_1a;
|
||||
INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
|
||||
connection node_2;
|
||||
INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
|
||||
connection node_1;
|
||||
connection node_1a;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 30000 FROM t1;
|
||||
COUNT(*) = 30000
|
||||
1
|
||||
SELECT COUNT(DISTINCT f1) = 30000 FROM t1;
|
||||
COUNT(DISTINCT f1) = 30000
|
||||
1
|
||||
SELECT COUNT(*) = 6 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
|
||||
COUNT(*) = 6
|
||||
0
|
||||
connection default;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
||||
555
mysql-test/suite/galera_sr/r/galera_sr_bf_abort.result
Normal file
555
mysql-test/suite/galera_sr/r/galera_sr_bf_abort.result
Normal file
@@ -0,0 +1,555 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
galera_sr_bf_abort_at_commit = 0
|
||||
after_replicate_sync
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (3);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
ROLLBACK;
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
local_monitor_master_enter_sync
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (3);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
ROLLBACK;
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
apply_monitor_master_enter_sync
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (3);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
ROLLBACK;
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
commit_monitor_master_enter_sync
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (3);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
ROLLBACK;
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
galera_sr_bf_abort_at_commit = 1
|
||||
after_replicate_sync
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
local_monitor_master_enter_sync
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
apply_monitor_master_enter_sync
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
commit_monitor_master_enter_sync
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
CALL mtr.add_suppression("WSREP: fragment replication failed: 1");
|
||||
23
mysql-test/suite/galera_sr/r/galera_sr_blob.result
Normal file
23
mysql-test/suite/galera_sr/r/galera_sr_blob.result
Normal file
@@ -0,0 +1,23 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 TEXT) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (REPEAT('x', 65535));
|
||||
connection node_2;
|
||||
wsrep_last_committed_delta
|
||||
1
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT LENGTH(f1) = 65535 FROM t1;
|
||||
LENGTH(f1) = 65535
|
||||
1
|
||||
DROP TABLE t1;
|
||||
65
mysql-test/suite/galera_sr/r/galera_sr_cc_master.result
Normal file
65
mysql-test/suite/galera_sr/r/galera_sr_cc_master.result
Normal file
@@ -0,0 +1,65 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_2;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2a;
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
SET GLOBAL wsrep_cluster_address = '';
|
||||
SET SESSION wsrep_sync_wait = DEFAULT;
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (6);
|
||||
ERROR HY000: Lost connection to MySQL server during query
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2a;
|
||||
connection node_1;
|
||||
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2b;
|
||||
SELECT * FROM mysql.wsrep_streaming_log;
|
||||
node_uuid trx_id seqno flags frag
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
connection node_2b;
|
||||
CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for");
|
||||
disconnect node_2;
|
||||
connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
59
mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result
Normal file
59
mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result
Normal file
@@ -0,0 +1,59 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_cluster_address = '';
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_sync_wait = default;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (6);
|
||||
INSERT INTO t1 VALUES (7);
|
||||
INSERT INTO t1 VALUES (8);
|
||||
INSERT INTO t1 VALUES (9);
|
||||
INSERT INTO t1 VALUES (10);
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (11);
|
||||
INSERT INTO t1 VALUES (12);
|
||||
INSERT INTO t1 VALUES (13);
|
||||
INSERT INTO t1 VALUES (14);
|
||||
INSERT INTO t1 VALUES (16);
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
CALL mtr.add_suppression("points to own listening address, blacklisting");
|
||||
36
mysql-test/suite/galera_sr/r/galera_sr_concurrent.result
Normal file
36
mysql-test/suite/galera_sr/r/galera_sr_concurrent.result
Normal file
@@ -0,0 +1,36 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t2 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2);
|
||||
INSERT INTO t2 VALUES (3);
|
||||
INSERT INTO t2 VALUES (4);
|
||||
INSERT INTO t2 VALUES (5);
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
SELECT COUNT(*) = 5 FROM t2;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
21
mysql-test/suite/galera_sr/r/galera_sr_conflict.result
Normal file
21
mysql-test/suite/galera_sr/r/galera_sr_conflict.result
Normal file
@@ -0,0 +1,21 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
INSERT INTO t1 VALUES(1);;
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
DROP TABLE t1;
|
||||
@@ -0,0 +1,31 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
@@ -0,0 +1,28 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (5);;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
@@ -0,0 +1,29 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
ROLLBACK;
|
||||
connection node_2;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
48
mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result
Normal file
48
mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result
Normal file
@@ -0,0 +1,48 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (6);
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
ROLLBACK;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 (f1) VALUES (1);
|
||||
INSERT INTO t1 (f1) VALUES (2);
|
||||
INSERT INTO t1 (f1) VALUES (3);
|
||||
INSERT INTO t1 (f1) VALUES (4);
|
||||
INSERT INTO t1 (f1) VALUES (5);
|
||||
INSERT INTO t1 (f1) VALUES (6);
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 6 FROM t1;
|
||||
COUNT(*) = 6
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 6 FROM t1;
|
||||
COUNT(*) = 6
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
23
mysql-test/suite/galera_sr/r/galera_sr_ddl_schema.result
Normal file
23
mysql-test/suite/galera_sr/r/galera_sr_ddl_schema.result
Normal file
@@ -0,0 +1,23 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 1);
|
||||
INSERT INTO t1 VALUES (2, 2);
|
||||
INSERT INTO t1 VALUES (3, 3);
|
||||
INSERT INTO t1 VALUES (4, 4);
|
||||
INSERT INTO t1 VALUES (5, 5);
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
DROP SCHEMA test;
|
||||
SELECT COUNT(*) = 0 FROM test.t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
connection node_1;
|
||||
INSERT INTO test.t1 VALUES (6, 6);
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
INSERT INTO test.t1 VALUES (6, 6);
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
CREATE SCHEMA test;
|
||||
50
mysql-test/suite/galera_sr/r/galera_sr_ddl_slave.result
Normal file
50
mysql-test/suite/galera_sr/r/galera_sr_ddl_slave.result
Normal file
@@ -0,0 +1,50 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 1);
|
||||
INSERT INTO t1 VALUES (2, 2);
|
||||
INSERT INTO t1 VALUES (3, 3);
|
||||
INSERT INTO t1 VALUES (4, 4);
|
||||
INSERT INTO t1 VALUES (5, 5);
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
ALTER TABLE t1 DROP COLUMN f2;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (6, 6);
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
INSERT INTO t1 VALUES (6, 6);
|
||||
ERROR 21S01: Column count doesn't match value count at row 1
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
42
mysql-test/suite/galera_sr/r/galera_sr_ddl_unrelated.result
Normal file
42
mysql-test/suite/galera_sr/r/galera_sr_ddl_unrelated.result
Normal file
@@ -0,0 +1,42 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 1);
|
||||
INSERT INTO t1 VALUES (2, 2);
|
||||
INSERT INTO t1 VALUES (3, 3);
|
||||
INSERT INTO t1 VALUES (4, 4);
|
||||
INSERT INTO t1 VALUES (5, 5);
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
ALTER TABLE t2 DROP COLUMN f2;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (6, 6);
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 6 FROM t1;
|
||||
COUNT(*) = 6
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
46
mysql-test/suite/galera_sr/r/galera_sr_dupkey_error.result
Normal file
46
mysql-test/suite/galera_sr/r/galera_sr_dupkey_error.result
Normal file
@@ -0,0 +1,46 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 BLOB) ENGINE=InnoDB;
|
||||
CREATE UNIQUE INDEX i1 ON t1 (f1(512));
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1024;
|
||||
INSERT INTO t1 VALUES (REPEAT('a', 512));
|
||||
INSERT INTO t1 VALUES (REPEAT('b', 512));
|
||||
INSERT INTO t1 VALUES (REPEAT('c', 512));
|
||||
INSERT INTO t1 VALUES (REPEAT('d', 512));
|
||||
INSERT INTO t1 VALUES (REPEAT('e', 512));
|
||||
INSERT INTO t1 VALUES (REPEAT('f', 512));
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (REPEAT('c', 512));
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (REPEAT('d', 512));
|
||||
INSERT INTO t1 VALUES (REPEAT('e', 512));
|
||||
INSERT INTO t1 VALUES (REPEAT('f', 512));
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (REPEAT('a', 512));
|
||||
INSERT INTO t1 VALUES (REPEAT('b', 512));
|
||||
INSERT INTO t1 VALUES (REPEAT('c', 512));
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 6 FROM t1;
|
||||
COUNT(*) = 6
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 6 FROM t1;
|
||||
COUNT(*) = 6
|
||||
1
|
||||
DROP TABLE t1;
|
||||
39
mysql-test/suite/galera_sr/r/galera_sr_fk_conflict.result
Normal file
39
mysql-test/suite/galera_sr/r/galera_sr_fk_conflict.result
Normal file
@@ -0,0 +1,39 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE grandparent (
|
||||
id INT NOT NULL PRIMARY KEY
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE parent (
|
||||
id INT NOT NULL PRIMARY KEY,
|
||||
grandparent_id INT,
|
||||
FOREIGN KEY (grandparent_id)
|
||||
REFERENCES grandparent(id)
|
||||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE child (
|
||||
id INT NOT NULL PRIMARY KEY,
|
||||
grandparent_id INT,
|
||||
FOREIGN KEY (grandparent_id)
|
||||
REFERENCES parent(grandparent_id)
|
||||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO grandparent VALUES (1),(2),(3),(4);
|
||||
INSERT INTO parent VALUES (1,1), (2,2);
|
||||
INSERT INTO child VALUES (1,1), (2,2);
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
START TRANSACTION;
|
||||
UPDATE grandparent SET id = 5 WHERE id = 1;
|
||||
connection node_2;
|
||||
SET SESSION innodb_lock_wait_timeout = 1;
|
||||
UPDATE grandparent SET id = 10 WHERE id = 5;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
DELETE FROM child;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
include/diff_servers.inc [servers=1 2]
|
||||
DROP TABLE child;
|
||||
DROP TABLE parent;
|
||||
DROP TABLE grandparent;
|
||||
57
mysql-test/suite/galera_sr/r/galera_sr_gtid.result
Normal file
57
mysql-test/suite/galera_sr/r/galera_sr_gtid.result
Normal file
@@ -0,0 +1,57 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY);
|
||||
SET SESSION wsrep_trx_fragment_size=1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SET SESSION wsrep_trx_fragment_size=1;
|
||||
UPDATE t1 SET f1 = 2;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size=0;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_trx_fragment_size=0;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' FROM 256;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000002 <Pos> Gtid_list 1 <End_log_pos> []
|
||||
mysqld-bin.000002 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000001
|
||||
mysqld-bin.000002 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000002
|
||||
mysqld-bin.000002 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
|
||||
mysqld-bin.000002 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INT PRIMARY KEY)
|
||||
mysqld-bin.000002 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
|
||||
mysqld-bin.000002 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
|
||||
mysqld-bin.000002 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000002 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000002 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
|
||||
mysqld-bin.000002 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-3
|
||||
mysqld-bin.000002 <Pos> Annotate_rows 2 <End_log_pos> UPDATE t1 SET f1 = 2
|
||||
mysqld-bin.000002 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000002 <Pos> Update_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000002 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
|
||||
connection node_2;
|
||||
SELECT 1 FROM DUAL;
|
||||
1
|
||||
1
|
||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' FROM 256;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000003 <Pos> Gtid_list 2 <End_log_pos> []
|
||||
mysqld-bin.000003 <Pos> Binlog_checkpoint 2 <End_log_pos> mysqld-bin.000003
|
||||
mysqld-bin.000003 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
|
||||
mysqld-bin.000003 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INT PRIMARY KEY)
|
||||
mysqld-bin.000003 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
|
||||
mysqld-bin.000003 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
|
||||
mysqld-bin.000003 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000003 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000003 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
|
||||
mysqld-bin.000003 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-3
|
||||
mysqld-bin.000003 <Pos> Annotate_rows 2 <End_log_pos> UPDATE t1 SET f1 = 2
|
||||
mysqld-bin.000003 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000003 <Pos> Update_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000003 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
|
||||
DROP TABLE t1;
|
||||
18
mysql-test/suite/galera_sr/r/galera_sr_insert_select.result
Normal file
18
mysql-test/suite/galera_sr/r/galera_sr_insert_select.result
Normal file
@@ -0,0 +1,18 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE ten (f1 INTEGER);
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('a', 255) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
||||
@@ -0,0 +1,29 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
@@ -0,0 +1,30 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
@@ -0,0 +1,30 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
@@ -0,0 +1,32 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
connection node_1a;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
DROP TABLE t1;
|
||||
31
mysql-test/suite/galera_sr/r/galera_sr_kill_query.result
Normal file
31
mysql-test/suite/galera_sr/r/galera_sr_kill_query.result
Normal file
@@ -0,0 +1,31 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;;
|
||||
connection node_2;
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
Killing query ...
|
||||
connection node_1;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3;
|
||||
SELECT COUNT(*) = 1000 FROM t1;
|
||||
COUNT(*) = 1000
|
||||
1
|
||||
connection node_1a;
|
||||
SELECT COUNT(*) = 1000 FROM t1;
|
||||
COUNT(*) = 1000
|
||||
1
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
||||
53
mysql-test/suite/galera_sr/r/galera_sr_kill_slave.result
Normal file
53
mysql-test/suite/galera_sr/r/galera_sr_kill_slave.result
Normal file
@@ -0,0 +1,53 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
CREATE TABLE t2 (f1 INTEGER);
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
LOCK TABLE t2 WRITE;
|
||||
connection node_1;
|
||||
INSERT INTO t2 VALUES (1);
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (6);
|
||||
INSERT INTO t1 VALUES (7);
|
||||
INSERT INTO t1 VALUES (8);
|
||||
INSERT INTO t1 VALUES (9);
|
||||
INSERT INTO t1 VALUES (10);
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (11);
|
||||
INSERT INTO t1 VALUES (12);
|
||||
INSERT INTO t1 VALUES (13);
|
||||
INSERT INTO t1 VALUES (14);
|
||||
INSERT INTO t1 VALUES (15);
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 15 FROM t1;
|
||||
COUNT(*) = 15
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
33
mysql-test/suite/galera_sr/r/galera_sr_large_fragment.result
Normal file
33
mysql-test/suite/galera_sr/r/galera_sr_large_fragment.result
Normal file
@@ -0,0 +1,33 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1024 * 1024 * 10;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT COUNT(*) > 50000 FROM t1;
|
||||
COUNT(*) > 50000
|
||||
1
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
|
||||
SET SESSION wsrep_sync_wait = 7;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COUNT(*) = 0
|
||||
1
|
||||
13
mysql-test/suite/galera_sr/r/galera_sr_load_data.result
Normal file
13
mysql-test/suite/galera_sr/r/galera_sr_load_data.result
Normal file
@@ -0,0 +1,13 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 512;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 20000 FROM t1;
|
||||
COUNT(*) = 20000
|
||||
1
|
||||
wsrep_last_committed_diff
|
||||
0
|
||||
DROP TABLE t1;
|
||||
@@ -0,0 +1,9 @@
|
||||
SET SESSION wsrep_trx_fragment_size = 512;
|
||||
SET GLOBAL wsrep_load_data_splitting = TRUE;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SELECT COUNT(*) = 95000 FROM t1;
|
||||
COUNT(*) = 95000
|
||||
1
|
||||
wsrep_last_committed_diff
|
||||
1
|
||||
DROP TABLE t1;
|
||||
124
mysql-test/suite/galera_sr/r/galera_sr_log_bin.result
Normal file
124
mysql-test/suite/galera_sr/r/galera_sr_log_bin.result
Normal file
@@ -0,0 +1,124 @@
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on=ON;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t2 VALUES (1);
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on=ON;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t3 VALUES (1);
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2a;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t4 VALUES (1);
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
INSERT INTO t2 VALUES (2);
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
INSERT INTO t3 VALUES (2);
|
||||
COMMIT;
|
||||
connection node_2a;
|
||||
INSERT INTO t4 VALUES (2);
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 2 FROM t4;
|
||||
COUNT(*) = 2
|
||||
1
|
||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000001 <Pos> Gtid_list 1 <End_log_pos> []
|
||||
mysqld-bin.000001 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000001
|
||||
mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-1
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (2)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
|
||||
mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t2 VALUES (1)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t2)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t2 VALUES (2)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t2)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
|
||||
mysqld-bin.000001 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-3
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t3 VALUES (1)
|
||||
mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t3)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t3 VALUES (2)
|
||||
mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t3)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
|
||||
mysqld-bin.000001 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-4
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t4 VALUES (1)
|
||||
mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t4)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t4 VALUES (2)
|
||||
mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t4)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 2 FROM t4;
|
||||
COUNT(*) = 2
|
||||
1
|
||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000001 <Pos> Gtid_list 2 <End_log_pos> []
|
||||
mysqld-bin.000001 <Pos> Binlog_checkpoint 2 <End_log_pos> mysqld-bin.000001
|
||||
mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-1
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (2)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
|
||||
mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t2 VALUES (1)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t2)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t2 VALUES (2)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t2)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
|
||||
mysqld-bin.000001 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-3
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t3 VALUES (1)
|
||||
mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t3)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t3 VALUES (2)
|
||||
mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t3)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
|
||||
mysqld-bin.000001 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-4
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t4 VALUES (1)
|
||||
mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t4)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t4 VALUES (2)
|
||||
mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t4)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
|
||||
DROP TABLE t1,t2,t3,t4;
|
||||
33
mysql-test/suite/galera_sr/r/galera_sr_many_fragments.result
Normal file
33
mysql-test/suite/galera_sr/r/galera_sr_many_fragments.result
Normal file
@@ -0,0 +1,33 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT COUNT(*) = 10000 FROM t1;
|
||||
COUNT(*) = 10000
|
||||
1
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
|
||||
SET SESSION wsrep_sync_wait = 7;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COUNT(*) = 0
|
||||
1
|
||||
16
mysql-test/suite/galera_sr/r/galera_sr_myisam.result
Normal file
16
mysql-test/suite/galera_sr/r/galera_sr_myisam.result
Normal file
@@ -0,0 +1,16 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 TEXT) ENGINE=MyISAM;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET GLOBAL wsrep_replicate_myisam = TRUE;
|
||||
INSERT INTO t1 VALUES (REPEAT('x', 65535));
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT LENGTH(f1) = 65535 FROM t1;
|
||||
LENGTH(f1) = 65535
|
||||
1
|
||||
DROP TABLE t1;
|
||||
connection node_1;
|
||||
58
mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result
Normal file
58
mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result
Normal file
@@ -0,0 +1,58 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
Setting SST method to mysqldump ...
|
||||
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'");
|
||||
call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
|
||||
connection node_1;
|
||||
CREATE USER 'sst';
|
||||
GRANT ALL PRIVILEGES ON *.* TO 'sst';
|
||||
SET GLOBAL wsrep_sst_auth = 'sst:';
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_sst_method = 'mysqldump';
|
||||
connection node_1;
|
||||
CREATE TABLE ten (f1 INTEGER);
|
||||
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SET SESSION wsrep_trx_fragment_size = 1000;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 255) FROM ten AS a1, ten AS a2, ten AS a3;
|
||||
UPDATE t1 SET f2 = REPEAT('y', 255);
|
||||
connection node_2;
|
||||
connection node_2;
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
Starting server ...
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
UPDATE t1 SET f2 = REPEAT('z', 255);
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
SELECT COUNT(*) = 1000 FROM t1;
|
||||
COUNT(*) = 1000
|
||||
1
|
||||
SELECT COUNT(*) = 1000 FROM t1 WHERE f2 = REPEAT('z', 255);
|
||||
COUNT(*) = 1000
|
||||
1
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size=0;
|
||||
connection node_1;
|
||||
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
|
||||
DROP USER sst;
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
|
||||
CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found");
|
||||
CALL mtr.add_suppression("Can't open and lock time zone table");
|
||||
CALL mtr.add_suppression("Can't open and lock privilege tables");
|
||||
CALL mtr.add_suppression("Info table is not ready to be used");
|
||||
CALL mtr.add_suppression("Native table .* has the wrong structure");
|
||||
CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
|
||||
37
mysql-test/suite/galera_sr/r/galera_sr_parallel_apply.result
Normal file
37
mysql-test/suite/galera_sr/r/galera_sr_parallel_apply.result
Normal file
@@ -0,0 +1,37 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_slave_threads = 5;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 (f2) VALUES (1);
|
||||
INSERT INTO t1 (f2) VALUES (1);
|
||||
INSERT INTO t1 (f2) VALUES (1);
|
||||
INSERT INTO t1 (f2) VALUES (1);
|
||||
INSERT INTO t1 (f2) VALUES (1);;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 (f2) VALUES (2);
|
||||
INSERT INTO t1 (f2) VALUES (2);
|
||||
INSERT INTO t1 (f2) VALUES (2);
|
||||
INSERT INTO t1 (f2) VALUES (2);
|
||||
INSERT INTO t1 (f2) VALUES (2);;
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
ROLLBACK;
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
connection node_2;
|
||||
42
mysql-test/suite/galera_sr/r/galera_sr_rollback.result
Normal file
42
mysql-test/suite/galera_sr/r/galera_sr_rollback.result
Normal file
@@ -0,0 +1,42 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 'a');
|
||||
INSERT INTO t1 VALUES (2, 'a');
|
||||
INSERT INTO t1 VALUES (3, 'a');
|
||||
INSERT INTO t1 VALUES (4, 'a');
|
||||
INSERT INTO t1 VALUES (5, 'a');
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (11, 'b');
|
||||
INSERT INTO t1 VALUES (12, 'b');
|
||||
INSERT INTO t1 VALUES (13, 'b');
|
||||
INSERT INTO t1 VALUES (14, 'b');
|
||||
INSERT INTO t1 VALUES (15, 'b');
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 'a');
|
||||
INSERT INTO t1 VALUES (2, 'a');
|
||||
INSERT INTO t1 VALUES (3, 'a');
|
||||
INSERT INTO t1 VALUES (4, 'a');
|
||||
INSERT INTO t1 VALUES (5, 'a');
|
||||
INSERT INTO t1 VALUES (11, 'b');
|
||||
INSERT INTO t1 VALUES (12, 'b');
|
||||
INSERT INTO t1 VALUES (13, 'b');
|
||||
INSERT INTO t1 VALUES (14, 'b');
|
||||
INSERT INTO t1 VALUES (15, 'b');
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
33
mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result
Normal file
33
mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result
Normal file
@@ -0,0 +1,33 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
DROP TABLE t1;
|
||||
@@ -0,0 +1,42 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 'a');
|
||||
INSERT INTO t1 VALUES (2, 'a');
|
||||
INSERT INTO t1 VALUES (3, 'a');
|
||||
INSERT INTO t1 VALUES (4, 'a');
|
||||
INSERT INTO t1 VALUES (5, 'a');
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
SAVEPOINT s1;
|
||||
INSERT INTO t1 VALUES (11, 'b');
|
||||
INSERT INTO t1 VALUES (12, 'b');
|
||||
INSERT INTO t1 VALUES (13, 'b');
|
||||
INSERT INTO t1 VALUES (14, 'b');
|
||||
INSERT INTO t1 VALUES (15, 'b');
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
ROLLBACK TO SAVEPOINT s1;
|
||||
INSERT INTO t1 VALUES (21, 'c');
|
||||
INSERT INTO t1 VALUES (22, 'c');
|
||||
INSERT INTO t1 VALUES (23, 'c');
|
||||
INSERT INTO t1 VALUES (24, 'c');
|
||||
INSERT INTO t1 VALUES (25, 'c');
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 5 FROM t1 WHERE f2 = 'a';
|
||||
COUNT(*) = 5
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'b';
|
||||
COUNT(*) = 0
|
||||
0
|
||||
SELECT COUNT(*) = 5 FROM t1 WHERE f2 = 'c';
|
||||
COUNT(*) = 5
|
||||
1
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
@@ -0,0 +1,22 @@
|
||||
CREATE TABLE ten (f1 INTEGER);
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('a', 255) FROM ten AS a1, ten AS a2, ten AS a3;
|
||||
ALTER TABLE t1 CHANGE f1 f1 INTEGER;
|
||||
ALTER TABLE t1 DROP PRIMARY KEY;
|
||||
INSERT INTO t1 VALUES (1, 'abc');
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
INSERT INTO t2 VALUES (1, 'abc');
|
||||
INSERT INTO t2 VALUES (2, 'abc');
|
||||
SELECT COUNT(*) = 2 FROM t2;
|
||||
COUNT(*) = 2
|
||||
1
|
||||
SELECT COUNT(*) = 2 FROM t2;
|
||||
COUNT(*) = 2
|
||||
1
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE ten;
|
||||
16
mysql-test/suite/galera_sr/r/galera_sr_sbr.result
Normal file
16
mysql-test/suite/galera_sr/r/galera_sr_sbr.result
Normal file
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE t1 (id INT) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET SESSION BINLOG_FORMAT='STATEMENT';
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
DROP TABLE t1;
|
||||
@@ -0,0 +1,31 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_2;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SET SESSION wsrep_trx_fragment_size=1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 3 FROM t1;
|
||||
COUNT(*) = 3
|
||||
1
|
||||
DROP TABLE t1;
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for ");
|
||||
43
mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result
Normal file
43
mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result
Normal file
@@ -0,0 +1,43 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1a;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SET SESSION wsrep_trx_fragment_size=1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11),(12),(13);
|
||||
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1b;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SET SESSION wsrep_trx_fragment_size=1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21),(22),(23);
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1a;
|
||||
INSERT INTO t1 VALUES (14),(15),(16);
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) > 0
|
||||
1
|
||||
SELECT COUNT(*) = 6 FROM t1 WHERE f1 IN (11,12,13,14,15,16);
|
||||
COUNT(*) = 6
|
||||
1
|
||||
connection node_1b;
|
||||
INSERT INTO t1 VALUES (24),(25),(26);
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 12 FROM t1;
|
||||
COUNT(*) = 12
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
15
mysql-test/suite/galera_sr/r/galera_sr_small_gcache.result
Normal file
15
mysql-test/suite/galera_sr/r/galera_sr_small_gcache.result
Normal file
@@ -0,0 +1,15 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 10000 FROM t1;
|
||||
COUNT(*) = 10000
|
||||
1
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
||||
198
mysql-test/suite/galera_sr/r/galera_sr_table_contents.result
Normal file
198
mysql-test/suite/galera_sr/r/galera_sr_table_contents.result
Normal file
@@ -0,0 +1,198 @@
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1),(2),(3);
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
|
||||
Start of Simple Insert
|
||||
INSERT INTO t1 VALUES (4);
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 73 Query thread_id=<QUERY_THREAD_ID> exec_time=<EXEC_TIME> error_code=0
|
||||
SET TIMESTAMP=<TIMESTAMP>/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at 193
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 114 Table_map: `test`.`t1` mapped to number <TABLE_ID>
|
||||
# at 234
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 150 Write_rows: table id <TABLE_ID> flags: STMT_END_F
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
End of Simple Insert
|
||||
|
||||
ROLLBACK;
|
||||
Start of Multi-row Update
|
||||
UPDATE t1 SET f1 = f1 + 10;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 73 Query thread_id=<QUERY_THREAD_ID> exec_time=<EXEC_TIME> error_code=0
|
||||
SET TIMESTAMP=<TIMESTAMP>/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at 193
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 114 Table_map: `test`.`t1` mapped to number <TABLE_ID>
|
||||
# at 234
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 156 Update_rows: table id <TABLE_ID> flags: STMT_END_F
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 197 Table_map: `test`.`t1` mapped to number <TABLE_ID>
|
||||
# at 161
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 239 Update_rows: table id <TABLE_ID> flags: STMT_END_F
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 280 Table_map: `test`.`t1` mapped to number <TABLE_ID>
|
||||
# at 161
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 322 Update_rows: table id <TABLE_ID> flags: STMT_END_F
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
End of Multi-row Update
|
||||
|
||||
ROLLBACK;
|
||||
Start of Multi-table Update
|
||||
UPDATE t1, t2 SET t1.f1 = t1.f1 + 100, t2.f1 = t2.f1 + 100;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 82 Query thread_id=<QUERY_THREAD_ID> exec_time=<EXEC_TIME> error_code=0
|
||||
SET TIMESTAMP=<TIMESTAMP>/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at 202
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 123 Table_map: `test`.`t1` mapped to number <TABLE_ID>
|
||||
# at 243
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 164 Table_map: `test`.`t2` mapped to number <TABLE_ID>
|
||||
# at 284
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 206 Update_rows: table id <TABLE_ID> flags: STMT_END_F
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 247 Table_map: `test`.`t1` mapped to number <TABLE_ID>
|
||||
# at 161
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 288 Table_map: `test`.`t2` mapped to number <TABLE_ID>
|
||||
# at 202
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 330 Update_rows: table id <TABLE_ID> flags: STMT_END_F
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 371 Table_map: `test`.`t1` mapped to number <TABLE_ID>
|
||||
# at 161
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 412 Table_map: `test`.`t2` mapped to number <TABLE_ID>
|
||||
# at 202
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 454 Update_rows: table id <TABLE_ID> flags: STMT_END_F
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 495 Table_map: `test`.`t1` mapped to number <TABLE_ID>
|
||||
# at 161
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 536 Table_map: `test`.`t2` mapped to number <TABLE_ID>
|
||||
# at 202
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 578 Update_rows: table id <TABLE_ID> flags: STMT_END_F
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 619 Table_map: `test`.`t1` mapped to number <TABLE_ID>
|
||||
# at 161
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 660 Table_map: `test`.`t2` mapped to number <TABLE_ID>
|
||||
# at 202
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 702 Update_rows: table id <TABLE_ID> flags: STMT_END_F
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 743 Table_map: `test`.`t1` mapped to number <TABLE_ID>
|
||||
# at 161
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 784 Table_map: `test`.`t2` mapped to number <TABLE_ID>
|
||||
# at 202
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 826 Update_rows: table id <TABLE_ID> flags: STMT_END_F
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
End of Multi-table Update
|
||||
|
||||
ROLLBACK;
|
||||
Start of Savepoint
|
||||
INSERT INTO t1 VALUES (1000);
|
||||
SAVEPOINT X;
|
||||
INSERT INTO t1 VALUES (2000);
|
||||
ROLLBACK TO SAVEPOINT X;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 73 Query thread_id=<QUERY_THREAD_ID> exec_time=<EXEC_TIME> error_code=0
|
||||
SET TIMESTAMP=<TIMESTAMP>/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at 193
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 114 Table_map: `test`.`t1` mapped to number <TABLE_ID>
|
||||
# at 234
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 150 Write_rows: table id <TABLE_ID> flags: STMT_END_F
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 231 Query thread_id=<QUERY_THREAD_ID> exec_time=<EXEC_TIME> error_code=0
|
||||
SET TIMESTAMP=<TIMESTAMP>/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
SAVEPOINT `X`
|
||||
/*!*/;
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 272 Table_map: `test`.`t1` mapped to number <TABLE_ID>
|
||||
# at 161
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 308 Write_rows: table id <TABLE_ID> flags: STMT_END_F
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
DELIMITER /*!*/;
|
||||
# at 120
|
||||
<ISO TIMESTAMP> server id 1 end_log_pos 391 Query thread_id=<QUERY_THREAD_ID> exec_time=<EXEC_TIME> error_code=0
|
||||
SET TIMESTAMP=<TIMESTAMP>/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
ROLLBACK TO `X`
|
||||
/*!*/;
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
End of Savepoint
|
||||
|
||||
ROLLBACK;
|
||||
DROP TABLE t1, t2;
|
||||
121
mysql-test/suite/galera_sr/r/galera_sr_transaction_replay.result
Normal file
121
mysql-test/suite/galera_sr/r/galera_sr_transaction_replay.result
Normal file
@@ -0,0 +1,121 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
|
||||
INSERT INTO t1 VALUES (1, 'a');
|
||||
INSERT INTO t1 VALUES (2, 'a');
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
|
||||
f1 f2
|
||||
2 a
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
wsrep_local_replays
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DELETE FROM t1;
|
||||
INSERT INTO t1 VALUES (1, 'a');
|
||||
INSERT INTO t1 VALUES (2, 'a');
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 1;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
|
||||
f1 f2
|
||||
2 a
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
wsrep_local_replays
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
@@ -0,0 +1,54 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 3;
|
||||
SET SESSION wsrep_trx_fragment_unit = 'statements';
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*)
|
||||
0
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connection node_2;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
2
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*)
|
||||
1
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
5
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*)
|
||||
2
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
5
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*)
|
||||
0
|
||||
connection node_2;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
5
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*)
|
||||
0
|
||||
DROP TABLE t1;
|
||||
20
mysql-test/suite/galera_sr/r/galera_sr_v1_row_events.result
Normal file
20
mysql-test/suite/galera_sr/r/galera_sr_v1_row_events.result
Normal file
@@ -0,0 +1,20 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=ON;
|
||||
UPDATE t1 SET f1 = 2 WHERE f1 = 1;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
36
mysql-test/suite/galera_sr/r/galera_sr_ws_size.result
Normal file
36
mysql-test/suite/galera_sr/r/galera_sr_ws_size.result
Normal file
@@ -0,0 +1,36 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(254)) ENGINE=InnoDB;
|
||||
CREATE TABLE ten (f1 INTEGER);
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
SET SESSION wsrep_trx_fragment_size = 512;
|
||||
SET GLOBAL wsrep_provider_options='repl.max_ws_size=4096';
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
SELECT COUNT(*) = 100 FROM t1;
|
||||
COUNT(*) = 100
|
||||
1
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
||||
connection node_1;
|
||||
call mtr.add_suppression('WSREP: transaction size limit.*');
|
||||
call mtr.add_suppression('WSREP: rbr write fail.*');
|
||||
call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*');
|
||||
call mtr.add_suppression('WSREP: transaction size exceeded.*');
|
||||
34
mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result
Normal file
34
mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result
Normal file
@@ -0,0 +1,34 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(254)) ENGINE=InnoDB;
|
||||
CREATE TABLE ten (f1 INTEGER);
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
SET SESSION wsrep_trx_fragment_size = 256;
|
||||
SET GLOBAL wsrep_provider_options='repl.max_ws_size=128';
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1, ten AS a2;
|
||||
Got one of the listed errors
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
||||
call mtr.add_suppression('WSREP: SR rollback replication failure.*');
|
||||
call mtr.add_suppression('WSREP: transaction size limit.*');
|
||||
call mtr.add_suppression('WSREP: SR rbr write fail.*');
|
||||
call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*');
|
||||
call mtr.add_suppression('WSREP: transaction size exceeded.*');
|
||||
call mtr.add_suppression('WSREP: fragment replication failed:');
|
||||
call mtr.add_suppression('WSREP: post commit failed for SR rollback');
|
||||
call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd:*');
|
||||
call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for *');
|
||||
@@ -0,0 +1,29 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_ignore_apply_errors = 2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET GLOBAL wsrep_on = OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SET GLOBAL wsrep_on = ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (3);
|
||||
DELETE FROM t1 WHERE f1 = 1;
|
||||
DELETE FROM t1 WHERE f1 = 2;
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL wsrep_ignore_apply_errors = 7;
|
||||
CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event");
|
||||
CALL mtr.add_suppression("Can't find record in 't1'");
|
||||
137
mysql-test/suite/galera_sr/r/mysql-wsrep#215.result
Normal file
137
mysql-test/suite/galera_sr/r/mysql-wsrep#215.result
Normal file
@@ -0,0 +1,137 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 2;
|
||||
SET SESSION wsrep_trx_fragment_unit = 'statements';
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_1a;
|
||||
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
INSERT INTO t1 VALUES (1);;
|
||||
connection node_1a;
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG_DBUG = '';
|
||||
SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1a;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
connection node_1;
|
||||
TRUNCATE TABLE t1;
|
||||
SET SESSION wsrep_trx_fragment_size = 10;
|
||||
SET SESSION wsrep_trx_fragment_unit = 'bytes';
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_1a;
|
||||
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG_DBUG = '';
|
||||
SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
ROLLBACK;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1a;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
connection node_1;
|
||||
TRUNCATE TABLE t1;
|
||||
SET SESSION wsrep_trx_fragment_size = 200;
|
||||
SET SESSION wsrep_trx_fragment_unit = 'bytes';
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_1a;
|
||||
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG_DBUG = '';
|
||||
SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1a;
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("WSREP: Could not find applier context for");
|
||||
65
mysql-test/suite/galera_sr/r/mysql-wsrep-features#136.result
Normal file
65
mysql-test/suite/galera_sr/r/mysql-wsrep-features#136.result
Normal file
@@ -0,0 +1,65 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on=ON;
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on=ON;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
COMMIT;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
INSERT INTO t1 VALUES (3),(4);
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000001 <Pos> Gtid_list 1 <End_log_pos> []
|
||||
mysqld-bin.000001 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000001
|
||||
mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
|
||||
mysqld-bin.000001 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB
|
||||
mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1),(2)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1),(2)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
|
||||
mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-3
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (3),(4)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 4 FROM t1;
|
||||
COUNT(*) = 4
|
||||
1
|
||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000001 <Pos> Gtid_list 2 <End_log_pos> []
|
||||
mysqld-bin.000001 <Pos> Binlog_checkpoint 2 <End_log_pos> mysqld-bin.000001
|
||||
mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
|
||||
mysqld-bin.000001 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB
|
||||
mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1),(2)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1),(2)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
|
||||
mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-3
|
||||
mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (3),(4)
|
||||
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
|
||||
mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
24
mysql-test/suite/galera_sr/r/mysql-wsrep-features#138.result
Normal file
24
mysql-test/suite/galera_sr/r/mysql-wsrep-features#138.result
Normal file
@@ -0,0 +1,24 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
connection node_2;
|
||||
SELECT flags FROM mysql.wsrep_streaming_log;
|
||||
flags
|
||||
1
|
||||
0
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
INSERT INTO t1 VALUES (3),(4);
|
||||
connection node_2;
|
||||
SELECT flags FROM mysql.wsrep_streaming_log;
|
||||
flags
|
||||
1
|
||||
0
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
DROP TABLE t1;
|
||||
12
mysql-test/suite/galera_sr/r/mysql-wsrep-features#14.result
Normal file
12
mysql-test/suite/galera_sr/r/mysql-wsrep-features#14.result
Normal file
@@ -0,0 +1,12 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
connection node_2;
|
||||
42
mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result
Normal file
42
mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result
Normal file
@@ -0,0 +1,42 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (6),(7),(8),(9),(10),(1);
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_slave_threads = 2;
|
||||
SET GLOBAL DEBUG = 'd,sync.wsrep_apply_cb';
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1a;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);;
|
||||
connection node_1;
|
||||
INSERT INTO t1 SELECT * FROM t2;;
|
||||
connection node_1a;
|
||||
INSERT INTO t1 VALUES (6), (7), (8), (9), (10);
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
Got one of the listed errors
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_slave_threads = 1;
|
||||
SET GLOBAL DEBUG = '';
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
|
||||
SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
|
||||
SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
|
||||
SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
|
||||
SELECT COUNT(*) = 10 FROM t1;
|
||||
COUNT(*) = 10
|
||||
1
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
11
mysql-test/suite/galera_sr/r/mysql-wsrep-features#15.result
Normal file
11
mysql-test/suite/galera_sr/r/mysql-wsrep-features#15.result
Normal file
@@ -0,0 +1,11 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id INT) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
752
mysql-test/suite/galera_sr/r/mysql-wsrep-features#165.result
Normal file
752
mysql-test/suite/galera_sr/r/mysql-wsrep-features#165.result
Normal file
@@ -0,0 +1,752 @@
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
|
||||
START TRANSACTION;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
INSERT INTO t1 VALUES (3, 'b');
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 x
|
||||
2 x
|
||||
4 x
|
||||
5 x
|
||||
UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
|
||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wait';
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 a
|
||||
2 a
|
||||
3 x
|
||||
4 a
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
35
mysql-test/suite/galera_sr/r/mysql-wsrep-features#22.result
Normal file
35
mysql-test/suite/galera_sr/r/mysql-wsrep-features#22.result
Normal file
@@ -0,0 +1,35 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SET SESSION wsrep_trx_fragment_size=1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1, 'a');
|
||||
INSERT INTO t1 VALUES (2, 'a');
|
||||
INSERT INTO t1 VALUES (3, 'a');
|
||||
INSERT INTO t1 VALUES (4, 'a');
|
||||
INSERT INTO t1 VALUES (5, 'a');
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
SAVEPOINT s1;
|
||||
INSERT INTO t1 VALUES (11, 'b');
|
||||
INSERT INTO t1 VALUES (12, 'b');
|
||||
INSERT INTO t1 VALUES (13, 'b');
|
||||
INSERT INTO t1 VALUES (14, 'b');
|
||||
INSERT INTO t1 VALUES (15, 'b');
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
ROLLBACK TO SAVEPOINT s1;
|
||||
INSERT INTO t1 VALUES (21, 'c');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 6 FROM t1;
|
||||
COUNT(*) = 6
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 6 FROM t1;
|
||||
COUNT(*) = 6
|
||||
0
|
||||
DROP TABLE t1;
|
||||
23
mysql-test/suite/galera_sr/r/mysql-wsrep-features#27.result
Normal file
23
mysql-test/suite/galera_sr/r/mysql-wsrep-features#27.result
Normal file
@@ -0,0 +1,23 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
DROP TABLE t1;
|
||||
14
mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result
Normal file
14
mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result
Normal file
@@ -0,0 +1,14 @@
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET SESSION binlog_format = STATEMENT;
|
||||
create table t1 (id int not null, f_id int not null, f int not null,
|
||||
primary key(f_id, id)) engine=innodb;
|
||||
create table t2 (id int not null,s_id int not null,s varchar(200),
|
||||
primary key(id)) engine=innodb;
|
||||
INSERT INTO t1 VALUES (8, 1, 3);
|
||||
INSERT INTO t1 VALUES (1, 2, 1);
|
||||
INSERT INTO t2 VALUES (1, 0, '');
|
||||
INSERT INTO t2 VALUES (8, 1, '');
|
||||
DELETE ml.* FROM t1 AS ml LEFT JOIN t2 AS mm ON (mm.id=ml.id)
|
||||
WHERE mm.id IS NULL;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
27
mysql-test/suite/galera_sr/r/mysql-wsrep-features#32.result
Normal file
27
mysql-test/suite/galera_sr/r/mysql-wsrep-features#32.result
Normal file
@@ -0,0 +1,27 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (9);
|
||||
INSERT INTO t1 VALUES (8);
|
||||
INSERT INTO t1 VALUES (7);
|
||||
INSERT INTO t1 VALUES (6);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
ROLLBACK;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
41
mysql-test/suite/galera_sr/r/mysql-wsrep-features#35.result
Normal file
41
mysql-test/suite/galera_sr/r/mysql-wsrep-features#35.result
Normal file
@@ -0,0 +1,41 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL debug = '+d,sync.wsrep_apply_cb';
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2a;
|
||||
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
INSERT INTO t1 VALUES (1);;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_2a;
|
||||
SET GLOBAL debug = '';
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||
connection node_2;
|
||||
Got one of the listed errors
|
||||
ROLLBACK;
|
||||
DROP TABLE t1;
|
||||
connection node_2a;
|
||||
SET DEBUG_SYNC = "RESET";
|
||||
39
mysql-test/suite/galera_sr/r/mysql-wsrep-features#8.result
Normal file
39
mysql-test/suite/galera_sr/r/mysql-wsrep-features#8.result
Normal file
@@ -0,0 +1,39 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 13 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name LIKE 'test/%';
|
||||
COUNT(*) = 13
|
||||
1
|
||||
connection node_1;
|
||||
INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
|
||||
connection node_2;
|
||||
SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz');
|
||||
COUNT(f2) = 10000
|
||||
1
|
||||
UPDATE t1 SET f2 = 'abcdefjhk';
|
||||
connection node_1;
|
||||
SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk');
|
||||
COUNT(f2) = 10000
|
||||
1
|
||||
connection node_2;
|
||||
DROP TABLE t1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 VARCHAR(100), FULLTEXT (f1)) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
INSERT INTO t1 (f1) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
|
||||
connection node_1;
|
||||
SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('foobarbaz');
|
||||
COUNT(f1) = 1000
|
||||
1
|
||||
UPDATE t1 SET f1 = 'abcdefjhk';
|
||||
connection node_2;
|
||||
SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('abcdefjhk');
|
||||
COUNT(f1) = 1000
|
||||
1
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
||||
20
mysql-test/suite/galera_sr/r/mysql-wsrep-features#9.result
Normal file
20
mysql-test/suite/galera_sr/r/mysql-wsrep-features#9.result
Normal file
@@ -0,0 +1,20 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||
connection node_2;
|
||||
connection node_2a;
|
||||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
|
||||
COUNT(*) = 2
|
||||
1
|
||||
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 2
|
||||
1
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
18
mysql-test/suite/galera_sr/r/mysql-wsrep-features#93.result
Normal file
18
mysql-test/suite/galera_sr/r/mysql-wsrep-features#93.result
Normal file
@@ -0,0 +1,18 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
SET SESSION WSREP_TRX_FRAGMENT_SIZE=1;
|
||||
START TRANSACTION;
|
||||
SAVEPOINT a;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
ROLLBACK TO SAVEPOINT a;
|
||||
INSERT INTO t1 values (2);
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 0 from mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 0 from mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
33
mysql-test/suite/galera_sr/r/mysql-wsrep-features#96.result
Normal file
33
mysql-test/suite/galera_sr/r/mysql-wsrep-features#96.result
Normal file
@@ -0,0 +1,33 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
|
||||
CREATE TABLE t2 (f2 VARCHAR(32));
|
||||
SET SESSION wsrep_trx_fragment_size=1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2),(1);
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
INSERT INTO t2 VALUES ('abc');
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM t2;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
Reference in New Issue
Block a user