Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-30473 : Do not allow GET_LOCK() / RELEASE_LOCK() in cluster
If WSREP_ON=ON do not allow GET_LOCK and RELEASE_LOCK functions. Instead print clear error message.
- Loading branch information
Jan Lindström
committed
Jan 27, 2023
1 parent
765291d
commit 844ddb1
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
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,19 @@ | ||
connection node_2; | ||
connection node_1; | ||
CREATE TABLE t (c DOUBLE,c2 INT,PRIMARY KEY(c)) ENGINE=InnoDB; | ||
INSERT INTO t values (1,1); | ||
SELECT GET_LOCK('a',1); | ||
ERROR 42000: This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)' | ||
SHOW WARNINGS; | ||
Level Code Message | ||
Error 1235 This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)' | ||
SELECT * FROM t; | ||
c c2 | ||
1 1 | ||
SELECT RELEASE_LOCK('a'); | ||
ERROR 42000: This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)' | ||
SHOW WARNINGS; | ||
Level Code Message | ||
Error 1235 This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)' | ||
COMMIT; | ||
DROP TABLE t; |
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,14 @@ | ||
--source include/galera_cluster.inc | ||
|
||
CREATE TABLE t (c DOUBLE,c2 INT,PRIMARY KEY(c)) ENGINE=InnoDB; | ||
INSERT INTO t values (1,1); | ||
--error ER_NOT_SUPPORTED_YET | ||
SELECT GET_LOCK('a',1); | ||
SHOW WARNINGS; | ||
SELECT * FROM t; | ||
--error ER_NOT_SUPPORTED_YET | ||
SELECT RELEASE_LOCK('a'); | ||
SHOW WARNINGS; | ||
COMMIT; | ||
DROP TABLE t; | ||
|
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