Browse Source

Merge branch '10.4-MDEV-18838' of https://github.com/codership/mariadb-server into 10.2-MDEV-18838

10.2-MDEV-18838
Julius Goryavsky 5 years ago
parent
commit
de5e171118
  1. 6
      mysql-test/suite/galera/r/galera_toi_truncate.result
  2. 11
      mysql-test/suite/galera/t/galera_toi_truncate.test

6
mysql-test/suite/galera/r/galera_toi_truncate.result

@ -5,12 +5,12 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
connection node_2;
SET SESSION wsrep_retry_autocommit = 0;
INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6, ten AS a7, ten AS a8;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
connection node_1;
TRUNCATE TABLE t1;;
TRUNCATE TABLE t1;
connection node_2;
ERROR 40001: Deadlock: wsrep aborted transaction
connection node_1;
connection node_2;
SELECT COUNT(*) AS EXPECT_0 FROM t1;
EXPECT_0
0

11
mysql-test/suite/galera/t/galera_toi_truncate.test

@ -25,17 +25,18 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 0;
--send INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6, ten AS a7, ten AS a8
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2a
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Sending data%' AND INFO LIKE 'INSERT INTO t1 (f1)%';
--source include/wait_condition.inc
--connection node_1
--send TRUNCATE TABLE t1;
TRUNCATE TABLE t1;
--connection node_2
--error ER_LOCK_DEADLOCK
--reap
--connection node_1
--reap
--connection node_2
SELECT COUNT(*) AS EXPECT_0 FROM t1;
--connection node_1

Loading…
Cancel
Save