summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2023-01-27 10:40:07 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2023-01-27 10:40:07 +0200
commit49ee18eb422d7c2bc3b349eef4be9134816b066a (patch)
tree29452ee7be7294116ebb9267076761d422b9a36a /sql
parent696562ce5528faa60653aa31058bf42f26d71dc4 (diff)
downloadmariadb-git-49ee18eb422d7c2bc3b349eef4be9134816b066a.tar.gz
MDEV-30473 : Do not allow GET_LOCK() / RELEASE_LOCK() in cluster
In 10.5 If WSREP_ON=ON do not allow RELEASE_ALL_LOCKS function. Instead print clear error message.
Diffstat (limited to 'sql')
-rw-r--r--sql/item_create.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 81621253cd5..5363a3407ab 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -4843,6 +4843,13 @@ Create_func_release_all_locks Create_func_release_all_locks::s_singleton;
Item*
Create_func_release_all_locks::create_builder(THD *thd)
{
+#ifdef WITH_WSREP
+ if (WSREP_ON && WSREP(thd))
+ {
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "RELEASE_ALL_LOCKS in cluster (WSREP_ON=ON)");
+ return NULL;
+ }
+#endif /* WITH_WSREP */
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
return new (thd->mem_root) Item_func_release_all_locks(thd);