File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ connection node_2;
2
+ connection node_1;
3
+ CREATE TABLE t (c DOUBLE,c2 INT,PRIMARY KEY(c)) ENGINE=InnoDB;
4
+ INSERT INTO t values (1,1);
5
+ SELECT GET_LOCK('a',1);
6
+ ERROR 42000: This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)'
7
+ SHOW WARNINGS;
8
+ Level Code Message
9
+ Error 1235 This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)'
10
+ SELECT * FROM t;
11
+ c c2
12
+ 1 1
13
+ SELECT RELEASE_LOCK('a');
14
+ ERROR 42000: This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)'
15
+ SHOW WARNINGS;
16
+ Level Code Message
17
+ Error 1235 This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)'
18
+ COMMIT;
19
+ DROP TABLE t;
Original file line number Diff line number Diff line change
1
+ --source include/galera_cluster.inc
2
+
3
+ CREATE TABLE t (c DOUBLE,c2 INT,PRIMARY KEY(c)) ENGINE=InnoDB;
4
+ INSERT INTO t values (1,1);
5
+ --error ER_NOT_SUPPORTED_YET
6
+ SELECT GET_LOCK('a',1);
7
+ SHOW WARNINGS;
8
+ SELECT * FROM t;
9
+ --error ER_NOT_SUPPORTED_YET
10
+ SELECT RELEASE_LOCK('a');
11
+ SHOW WARNINGS;
12
+ COMMIT;
13
+ DROP TABLE t;
14
+
Original file line number Diff line number Diff line change @@ -4933,6 +4933,13 @@ Create_func_get_lock Create_func_get_lock::s_singleton;
4933
4933
Item*
4934
4934
Create_func_get_lock::create_2_arg (THD *thd, Item *arg1, Item *arg2)
4935
4935
{
4936
+ #ifdef WITH_WSREP
4937
+ if (WSREP_ON && WSREP (thd))
4938
+ {
4939
+ my_error (ER_NOT_SUPPORTED_YET, MYF (0 ), " GET_LOCK in cluster (WSREP_ON=ON)" );
4940
+ return NULL ;
4941
+ }
4942
+ #endif /* WITH_WSREP */
4936
4943
thd->lex ->set_stmt_unsafe (LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
4937
4944
thd->lex ->uncacheable (UNCACHEABLE_SIDEEFFECT);
4938
4945
return new (thd->mem_root ) Item_func_get_lock (thd, arg1, arg2);
@@ -6535,6 +6542,13 @@ Create_func_release_lock Create_func_release_lock::s_singleton;
6535
6542
Item*
6536
6543
Create_func_release_lock::create_1_arg (THD *thd, Item *arg1)
6537
6544
{
6545
+ #ifdef WITH_WSREP
6546
+ if (WSREP_ON && WSREP (thd))
6547
+ {
6548
+ my_error (ER_NOT_SUPPORTED_YET, MYF (0 ), " RELEASE_LOCK in cluster (WSREP_ON=ON)" );
6549
+ return NULL ;
6550
+ }
6551
+ #endif /* WITH_WSREP */
6538
6552
thd->lex ->set_stmt_unsafe (LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
6539
6553
thd->lex ->uncacheable (UNCACHEABLE_SIDEEFFECT);
6540
6554
return new (thd->mem_root ) Item_func_release_lock (thd, arg1);
You can’t perform that action at this time.
0 commit comments