mirror of
https://github.com/MariaDB/server.git
synced 2025-04-21 06:35:31 +02:00

Updated tests: cases with bugs or which cannot be run with the cursor-protocol were excluded with "--disable_cursor_protocol"/"--enable_cursor_protocol" Fix for v.10.5
30 lines
651 B
Text
30 lines
651 B
Text
--source include/have_innodb.inc
|
|
|
|
--echo #
|
|
--echo # MDEV-19535 sql_mode=ORACLE: 'SELECT INTO @var FOR UPDATE' does not lock the table
|
|
--echo #
|
|
|
|
SET sql_mode='ORACLE';
|
|
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY) engine=innodb;
|
|
INSERT INTO t1 VALUES (1);
|
|
START TRANSACTION;
|
|
--disable_cursor_protocol
|
|
SELECT a AS a_con1 FROM t1 INTO @a FOR UPDATE;
|
|
--enable_cursor_protocol
|
|
|
|
--connect(con2,localhost,root,,)
|
|
SET sql_mode='ORACLE';
|
|
START TRANSACTION;
|
|
--send SELECT a AS a_con2 FROM t1 INTO @a FOR UPDATE;
|
|
|
|
--connection default
|
|
UPDATE t1 SET a=a+100;
|
|
COMMIT;
|
|
|
|
--connection con2
|
|
--reap
|
|
SELECT a AS con2 FROM t1;
|
|
COMMIT;
|
|
|
|
--connection default
|
|
DROP TABLE t1;
|