diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2023-01-26 14:34:12 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2023-01-27 10:34:06 +0200 |
commit | 696562ce5528faa60653aa31058bf42f26d71dc4 (patch) | |
tree | 1547a9ae1fea34740d56281a58d3fa918db974bf /mysql-test/suite | |
parent | 015fb54d45a27dc33191f513f896ab1ead5d2377 (diff) | |
download | mariadb-git-696562ce5528faa60653aa31058bf42f26d71dc4.tar.gz |
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.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/galera/r/galera_locks_funcs.result | 19 | ||||
-rw-r--r-- | mysql-test/suite/galera/t/galera_locks_funcs.test | 14 |
2 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/r/galera_locks_funcs.result b/mysql-test/suite/galera/r/galera_locks_funcs.result new file mode 100644 index 00000000000..378067aa461 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_locks_funcs.result @@ -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; diff --git a/mysql-test/suite/galera/t/galera_locks_funcs.test b/mysql-test/suite/galera/t/galera_locks_funcs.test new file mode 100644 index 00000000000..68737f2daab --- /dev/null +++ b/mysql-test/suite/galera/t/galera_locks_funcs.test @@ -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; + |