summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/r/rpl_get_lock.result
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/rpl/r/rpl_get_lock.result
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/rpl/r/rpl_get_lock.result')
-rw-r--r--mysql-test/suite/rpl/r/rpl_get_lock.result38
1 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_get_lock.result b/mysql-test/suite/rpl/r/rpl_get_lock.result
new file mode 100644
index 00000000..b852546e
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_get_lock.result
@@ -0,0 +1,38 @@
+include/master-slave.inc
+[connection master]
+CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
+create table t1(n int);
+insert into t1 values(get_lock("lock",2));
+disconnect master;
+connection master1;
+select get_lock("lock",2);
+get_lock("lock",2)
+1
+select release_lock("lock");
+release_lock("lock")
+1
+connection slave;
+select get_lock("lock",3);
+get_lock("lock",3)
+1
+select * from t1;
+n
+1
+select is_free_lock("lock"), is_used_lock("lock") = connection_id();
+is_free_lock("lock") is_used_lock("lock") = connection_id()
+0 1
+explain extended select is_free_lock("lock"), is_used_lock("lock");
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+Warnings:
+Note 1003 select is_free_lock('lock') AS `is_free_lock("lock")`,is_used_lock('lock') AS `is_used_lock("lock")`
+select is_free_lock("lock2");
+is_free_lock("lock2")
+1
+select is_free_lock(NULL);
+is_free_lock(NULL)
+NULL
+connection master1;
+drop table t1;
+connection slave;
+include/rpl_end.inc