-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-22222: Assertion `state() == s_executing || state() == s_prepari…
…ng || state() == s_prepared || state() == s_must_abort || state() == s_aborting || state() == s_cert_failed || state() == s_must_replay' failed in wsrep::transaction::before_rollback LOCK TABLE will do implicit commit, we need to properly handle transaction after commit.
- Loading branch information
mkaruza
committed
Jun 28, 2020
1 parent
d4d42a6
commit 2b8b739
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
mysql-test/suite/galera/r/galera_lock_tables_in_transaction.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
connection node_2; | ||
connection node_1; | ||
CREATE TABLE t1 (a INT) ENGINE=InnoDB; | ||
START TRANSACTION; | ||
INSERT INTO t1 VALUES (1); | ||
LOCK TABLES t2 READ; | ||
ERROR 42S02: Table 'test.t2' doesn't exist | ||
START TRANSACTION; | ||
INSERT INTO t1 VALUES (1); | ||
LOCK TABLES t1 READ; | ||
UNLOCK TABLES; | ||
DROP TABLE t1; |
21 changes: 21 additions & 0 deletions
21
mysql-test/suite/galera/t/galera_lock_tables_in_transaction.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Check `LOCK TABLES` command with or without existing table in database. | ||
# Test case for MDEV-22222 / MDEV-22223 | ||
# | ||
|
||
--source include/galera_cluster.inc | ||
--source include/have_innodb.inc | ||
|
||
CREATE TABLE t1 (a INT) ENGINE=InnoDB; | ||
|
||
START TRANSACTION; | ||
INSERT INTO t1 VALUES (1); | ||
--error ER_NO_SUCH_TABLE | ||
LOCK TABLES t2 READ; | ||
|
||
START TRANSACTION; | ||
INSERT INTO t1 VALUES (1); | ||
LOCK TABLES t1 READ; | ||
UNLOCK TABLES; | ||
|
||
DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters