mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-6720 - enable connection log in mysqltest by default
This commit is contained in:
@ -290,7 +290,10 @@ COUNT(*)
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL storage_engine=@old_engine;
|
||||
# Connection default
|
||||
connect c1,127.0.0.1,root,,test,$MASTER_MYPORT,;
|
||||
connect c2,127.0.0.1,root,,test,$MASTER_MYPORT,;
|
||||
connect c3,127.0.0.1,root,,test,$MASTER_MYPORT,;
|
||||
connection default;
|
||||
SET binlog_format= mixed;
|
||||
RESET MASTER;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
@ -300,32 +303,32 @@ INSERT INTO t2 VALUES (1,0), (2,0);
|
||||
SELECT GET_LOCK("block_queries_1", 120);
|
||||
GET_LOCK("block_queries_1", 120)
|
||||
1
|
||||
# Connection c3
|
||||
connection c3;
|
||||
SELECT GET_LOCK("block_queries_2", 120);
|
||||
GET_LOCK("block_queries_2", 120)
|
||||
1
|
||||
# Connection c1
|
||||
connection c1;
|
||||
SET @c= 0;
|
||||
SELECT IF(@c<1, @c:=@c+1, GET_LOCK("block_queries_1", 120)) FROM t1 ORDER BY a;
|
||||
# Connection c2
|
||||
connection c2;
|
||||
SET binlog_format="row";
|
||||
SET @d= 10;
|
||||
UPDATE t2 SET b=IF(@d<=10, @d:=@d+1, GET_LOCK("block_queries_2", 120)) ORDER BY a;
|
||||
# Connection default
|
||||
connection default;
|
||||
# Make sure other queries are running (and waiting).
|
||||
SELECT RELEASE_LOCK("block_queries_1");
|
||||
RELEASE_LOCK("block_queries_1")
|
||||
1
|
||||
# Connection c3
|
||||
connection c3;
|
||||
SELECT RELEASE_LOCK("block_queries_2");
|
||||
RELEASE_LOCK("block_queries_2")
|
||||
1
|
||||
# Connection c1
|
||||
connection c1;
|
||||
IF(@c<1, @c:=@c+1, GET_LOCK("block_queries_1", 120))
|
||||
1
|
||||
1
|
||||
# Connection c2
|
||||
# Connection default
|
||||
connection c2;
|
||||
connection default;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a b
|
||||
1 11
|
||||
|
Reference in New Issue
Block a user