mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 11:31:51 +01:00
115 lines
2.9 KiB
Text
115 lines
2.9 KiB
Text
|
** Setup **
|
||
|
|
||
|
** Connecting con0 using root **
|
||
|
** Connecting con1 using root **
|
||
|
** Connection default **
|
||
|
SET @global_low_priority_updates = @@GLOBAL.low_priority_updates;
|
||
|
SET @session_low_priority_updates = @@SESSION.low_priority_updates;
|
||
|
CREATE TABLE t1 (a varchar(100));
|
||
|
'#--------------------FN_DYNVARS_160_01-------------------------#'
|
||
|
** Connection con0 **
|
||
|
SET SESSION low_priority_updates = ON;
|
||
|
** Connection con1 **
|
||
|
SET SESSION low_priority_updates = ON;
|
||
|
** Connection default **
|
||
|
SET SESSION low_priority_updates = ON;
|
||
|
INSERT INTO t1 VALUES('1');
|
||
|
INSERT INTO t1 VALUES('2');
|
||
|
INSERT INTO t1 VALUES('3');
|
||
|
INSERT INTO t1 VALUES('4');
|
||
|
INSERT INTO t1 VALUES('5');
|
||
|
INSERT INTO t1 VALUES('6');
|
||
|
LOCK TABLE t1 WRITE;
|
||
|
** Connection con1 **
|
||
|
** Asynchronous Execution **
|
||
|
UPDATE t1 SET a = CONCAT(a,"-updated");|
|
||
|
** Connection con0 **
|
||
|
** Asynchronous Execution **
|
||
|
LOCK TABLE t1 READ;
|
||
|
SELECT * FROM t1;
|
||
|
UNLOCK TABLES;|
|
||
|
** Connection default **
|
||
|
Sleeping for 1 secs
|
||
|
UNLOCK TABLES;
|
||
|
** Connection con0 **
|
||
|
** Asynchronous Result **
|
||
|
a
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
Expected values of a without -updated;
|
||
|
** Connection default **
|
||
|
DELETE FROM t1;
|
||
|
'#--------------------FN_DYNVARS_160_02-------------------------#'
|
||
|
** Connection con0 **
|
||
|
SET SESSION low_priority_updates = OFF;
|
||
|
** Connection con1 **
|
||
|
SET SESSION low_priority_updates = OFF;
|
||
|
** Connection default**
|
||
|
SET SESSION low_priority_updates = OFF;
|
||
|
INSERT INTO t1 VALUES('1');
|
||
|
INSERT INTO t1 VALUES('2');
|
||
|
INSERT INTO t1 VALUES('3');
|
||
|
INSERT INTO t1 VALUES('4');
|
||
|
INSERT INTO t1 VALUES('5');
|
||
|
INSERT INTO t1 VALUES('6');
|
||
|
LOCK TABLE t1 WRITE;
|
||
|
** Connection con1 **
|
||
|
** Asynchronous Execution **
|
||
|
UPDATE t1 SET a = CONCAT(a,"-updated");|
|
||
|
** Connection con0 **
|
||
|
** Asynchronous Execution **
|
||
|
LOCK TABLE t1 READ;
|
||
|
SELECT * FROM t1;
|
||
|
UNLOCK TABLES;|
|
||
|
** Connection default **
|
||
|
Sleeping for 1 secs
|
||
|
UNLOCK TABLES;
|
||
|
** Connection con0 **
|
||
|
** Asynchronous Result **
|
||
|
a
|
||
|
1-updated
|
||
|
2-updated
|
||
|
3-updated
|
||
|
4-updated
|
||
|
5-updated
|
||
|
6-updated
|
||
|
Expected values of a with -updated;
|
||
|
** Connection default**
|
||
|
DELETE FROM t1;
|
||
|
'#--------------------FN_DYNVARS_160_03-------------------------#'
|
||
|
** Connecting con_int1 using root **
|
||
|
** Connection con_int1 **
|
||
|
SELECT @@SESSION.low_priority_updates;
|
||
|
@@SESSION.low_priority_updates
|
||
|
0
|
||
|
1 / TRUE Expected
|
||
|
SET SESSION low_priority_updates = FALSE;
|
||
|
** Connecting con_int2 using root **
|
||
|
** Connection con_int2 **
|
||
|
SELECT @@SESSION.low_priority_updates;
|
||
|
@@SESSION.low_priority_updates
|
||
|
0
|
||
|
1 / TRUE Expected
|
||
|
SET SESSION low_priority_updates = TRUE;
|
||
|
** Connection con_int1 **
|
||
|
SELECT @@SESSION.low_priority_updates;
|
||
|
@@SESSION.low_priority_updates
|
||
|
0
|
||
|
0 / FALSE Expected
|
||
|
** Connection con_int2 **
|
||
|
SELECT @@SESSION.low_priority_updates;
|
||
|
@@SESSION.low_priority_updates
|
||
|
1
|
||
|
1 / TRUE Expected
|
||
|
** Connection default **
|
||
|
Disconnecting Connections con_int1, con_int2
|
||
|
** Connection default **
|
||
|
Disconnecting Connections con0, con1
|
||
|
DROP TABLE t1;
|
||
|
SET @@GLOBAL.low_priority_updates = @global_low_priority_updates;
|
||
|
SET @@SESSION.low_priority_updates = @session_low_priority_updates;
|