Skip to content

Commit ca17a5e

Browse files
author
Nisha Gopalakrishnan
committed
Merge branch 'mysql-5.7' into mysql-trunk
2 parents 9f16b7b + 9f2a94c commit ca17a5e

File tree

252 files changed

+1983
-2049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

252 files changed

+1983
-2049
lines changed

mysql-test/include/concurrent.inc

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ connection default;
2727
#
2828
# Show prerequisites for this test.
2929
#
30-
SELECT @@global.tx_isolation;
30+
SELECT @@global.transaction_isolation;
3131
#
3232
# Semi-consistent read is done only for isolation levels READ
3333
# COMMITTED and READ UNCOMMITTED. The variable $keep_locks is
3434
# false if semi-consistent read is done.
3535
#
36-
let $keep_locks= `SELECT @@global.tx_isolation = 'REPEATABLE-READ'`;
36+
let $keep_locks= `SELECT @@global.transaction_isolation = 'REPEATABLE-READ'`;
3737

3838
--echo # keep_locks == $keep_locks
3939

mysql-test/include/mix2.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ eval create table t1 (id int unsigned not null auto_increment, code tinyint unsi
775775

776776
BEGIN;
777777
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
778-
SELECT @@tx_isolation,@@global.tx_isolation;
778+
SELECT @@transaction_isolation, @@global.transaction_isolation;
779779
insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David');
780780
select id, code, name from t1 order by id;
781781
COMMIT;

mysql-test/include/mrr_innodb_tests.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5);
2626
COMMIT;
2727

2828
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
29-
SELECT @@tx_isolation;
29+
SELECT @@transaction_isolation;
3030
START TRANSACTION;
3131

3232
EXPLAIN SELECT * FROM t1 WHERE a > 2 FOR UPDATE;

mysql-test/r/commit.result

+22-22
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ SET @@autocommit=0;
1818
COMMIT;
1919
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
2020
START TRANSACTION;
21-
SELECT @@tx_isolation;
22-
@@tx_isolation
21+
SELECT @@transaction_isolation;
22+
@@transaction_isolation
2323
REPEATABLE-READ
2424
Should be REPEATABLE READ
2525
SELECT * FROM t1;
2626
s1
2727
1
2828
2
29-
SELECT @@tx_isolation;
30-
@@tx_isolation
29+
SELECT @@transaction_isolation;
30+
@@transaction_isolation
3131
REPEATABLE-READ
3232
Should be REPEATABLE READ
3333
INSERT INTO t1 VALUES (-1);
34-
SELECT @@tx_isolation;
35-
@@tx_isolation
34+
SELECT @@transaction_isolation;
35+
@@transaction_isolation
3636
REPEATABLE-READ
3737
Should be REPEATABLE READ
3838
COMMIT;
@@ -305,20 +305,20 @@ COMMIT;
305305
#
306306
# Test 2: Check setting of variable.
307307
SET SESSION TRANSACTION READ WRITE;
308-
SELECT @@tx_read_only;
309-
@@tx_read_only
308+
SELECT @@transaction_read_only;
309+
@@transaction_read_only
310310
0
311311
SET SESSION TRANSACTION READ ONLY;
312-
SELECT @@tx_read_only;
313-
@@tx_read_only
312+
SELECT @@transaction_read_only;
313+
@@transaction_read_only
314314
1
315315
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE;
316-
SELECT @@tx_read_only;
317-
@@tx_read_only
316+
SELECT @@transaction_read_only;
317+
@@transaction_read_only
318318
0
319319
SET SESSION TRANSACTION READ ONLY, ISOLATION LEVEL REPEATABLE READ;
320-
SELECT @@tx_read_only;
321-
@@tx_read_only
320+
SELECT @@transaction_read_only;
321+
@@transaction_read_only
322322
1
323323
START TRANSACTION;
324324
# Not allowed inside a transaction
@@ -523,16 +523,16 @@ DROP TABLE t1;
523523
# Test 7: SET TRANSACTION inside stored routines
524524
CREATE PROCEDURE p1() SET SESSION TRANSACTION READ ONLY;
525525
CALL p1();
526-
SELECT @@tx_read_only;
527-
@@tx_read_only
526+
SELECT @@transaction_read_only;
527+
@@transaction_read_only
528528
1
529529
SET SESSION TRANSACTION READ WRITE;
530530
DROP PROCEDURE p1;
531531
CREATE PROCEDURE p1() SET SESSION TRANSACTION READ ONLY,
532532
ISOLATION LEVEL SERIALIZABLE;
533533
CALL p1();
534-
SELECT @@tx_read_only;
535-
@@tx_read_only
534+
SELECT @@transaction_read_only;
535+
@@transaction_read_only
536536
1
537537
SET SESSION TRANSACTION READ WRITE, ISOLATION LEVEL REPEATABLE READ;
538538
DROP PROCEDURE p1;
@@ -544,8 +544,8 @@ END|
544544
SELECT f1();
545545
f1()
546546
1
547-
SELECT @@tx_read_only;
548-
@@tx_read_only
547+
SELECT @@transaction_read_only;
548+
@@transaction_read_only
549549
1
550550
SET SESSION TRANSACTION READ WRITE;
551551
DROP FUNCTION f1;
@@ -557,8 +557,8 @@ END|
557557
SELECT f1();
558558
f1()
559559
1
560-
SELECT @@tx_read_only;
561-
@@tx_read_only
560+
SELECT @@transaction_read_only;
561+
@@transaction_read_only
562562
1
563563
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE;
564564
DROP FUNCTION f1;

mysql-test/r/concurrent_innodb_safelog.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;
2-
SELECT @@global.tx_isolation;
3-
@@global.tx_isolation
2+
SELECT @@global.transaction_isolation;
3+
@@global.transaction_isolation
44
REPEATABLE-READ
55
# keep_locks == 1
66
CREATE USER mysqltest@localhost;

mysql-test/r/concurrent_innodb_unsafelog.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
22
SET @old_lock_wait_timeout= @@global.innodb_lock_wait_timeout;
33
SET GLOBAL innodb_lock_wait_timeout=1;
4-
SELECT @@global.tx_isolation;
5-
@@global.tx_isolation
4+
SELECT @@global.transaction_isolation;
5+
@@global.transaction_isolation
66
READ-COMMITTED
77
# keep_locks == 0
88
CREATE USER mysqltest@localhost;

mysql-test/r/deprecate_eof.result

+4-4
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ DECLARE v1 int;
261261
DECLARE done INT DEFAULT FALSE;
262262
DECLARE cur1 CURSOR FOR SELECT * FROM t1;
263263
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
264-
SET @@session.tx_isolation='READ-COMMITTED';
264+
SET @@session.transaction_isolation='READ-COMMITTED';
265265
OPEN cur1;
266266
read_loop: LOOP
267267
FETCH cur1 INTO v1;
@@ -276,7 +276,7 @@ CALL cursor1();
276276
v1
277277
6
278278
-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES
279-
-- tx_isolation
279+
-- transaction_isolation
280280
-- READ-COMMITTED
281281

282282
-- Tracker : SESSION_TRACK_STATE_CHANGE
@@ -288,7 +288,7 @@ DECLARE x int;
288288
DECLARE y int;
289289
DECLARE c1 CURSOR FOR SELECT * FROM t1 limit 1;
290290
DECLARE c2 CURSOR FOR SELECT * FROM t2 limit 1;
291-
SET @@session.tx_isolation='READ-COMMITTED';
291+
SET @@session.transaction_isolation='READ-COMMITTED';
292292
OPEN c1;
293293
OPEN c2;
294294
FETCH c1 INTO x;
@@ -302,7 +302,7 @@ CALL cursor2();
302302
(x+y)
303303
2
304304
-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES
305-
-- tx_isolation
305+
-- transaction_isolation
306306
-- READ-COMMITTED
307307

308308
-- Tracker : SESSION_TRACK_STATE_CHANGE

mysql-test/r/innodb_mrr.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,8 @@ b INT
758758
INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5);
759759
COMMIT;
760760
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
761-
SELECT @@tx_isolation;
762-
@@tx_isolation
761+
SELECT @@transaction_isolation;
762+
@@transaction_isolation
763763
REPEATABLE-READ
764764
START TRANSACTION;
765765
EXPLAIN SELECT * FROM t1 WHERE a > 2 FOR UPDATE;

mysql-test/r/innodb_mrr_all.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,8 @@ b INT
758758
INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5);
759759
COMMIT;
760760
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
761-
SELECT @@tx_isolation;
762-
@@tx_isolation
761+
SELECT @@transaction_isolation;
762+
@@transaction_isolation
763763
REPEATABLE-READ
764764
START TRANSACTION;
765765
EXPLAIN SELECT * FROM t1 WHERE a > 2 FOR UPDATE;

mysql-test/r/innodb_mrr_cost.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,8 @@ b INT
758758
INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5);
759759
COMMIT;
760760
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
761-
SELECT @@tx_isolation;
762-
@@tx_isolation
761+
SELECT @@transaction_isolation;
762+
@@transaction_isolation
763763
REPEATABLE-READ
764764
START TRANSACTION;
765765
EXPLAIN SELECT * FROM t1 WHERE a > 2 FOR UPDATE;

mysql-test/r/innodb_mrr_cost_all.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,8 @@ b INT
758758
INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5);
759759
COMMIT;
760760
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
761-
SELECT @@tx_isolation;
762-
@@tx_isolation
761+
SELECT @@transaction_isolation;
762+
@@transaction_isolation
763763
REPEATABLE-READ
764764
START TRANSACTION;
765765
EXPLAIN SELECT * FROM t1 WHERE a > 2 FOR UPDATE;

mysql-test/r/innodb_mrr_cost_icp.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,8 @@ b INT
758758
INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5);
759759
COMMIT;
760760
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
761-
SELECT @@tx_isolation;
762-
@@tx_isolation
761+
SELECT @@transaction_isolation;
762+
@@transaction_isolation
763763
REPEATABLE-READ
764764
START TRANSACTION;
765765
EXPLAIN SELECT * FROM t1 WHERE a > 2 FOR UPDATE;

mysql-test/r/innodb_mrr_icp.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,8 @@ b INT
758758
INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5);
759759
COMMIT;
760760
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
761-
SELECT @@tx_isolation;
762-
@@tx_isolation
761+
SELECT @@transaction_isolation;
762+
@@transaction_isolation
763763
REPEATABLE-READ
764764
START TRANSACTION;
765765
EXPLAIN SELECT * FROM t1 WHERE a > 2 FOR UPDATE;

mysql-test/r/innodb_mrr_none.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,8 @@ b INT
757757
INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5);
758758
COMMIT;
759759
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
760-
SELECT @@tx_isolation;
761-
@@tx_isolation
760+
SELECT @@transaction_isolation;
761+
@@transaction_isolation
762762
REPEATABLE-READ
763763
START TRANSACTION;
764764
EXPLAIN SELECT * FROM t1 WHERE a > 2 FOR UPDATE;

mysql-test/r/innodb_mysql_lock2.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# This test makes sense only in REPEATABLE-READ mode as
1313
# in SERIALIZABLE mode all statements that read data take
1414
# shared lock on them to enforce its semantics.
15-
select @@session.tx_isolation;
16-
@@session.tx_isolation
15+
select @@session.transaction_isolation;
16+
@@session.transaction_isolation
1717
REPEATABLE-READ
1818
# Prepare playground by creating tables, views,
1919
# routines and triggers used in tests.

mysql-test/r/is_lock_table.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@ Case 4: IS query under SERIALIZABLE ISOLATION + AUTO_COMMIT OFF
115115
DROP TABLE should success. If I_S query doesn't do non-locking read,
116116
then the DROP TABLE would block, waiting for innodb lock to be release
117117
until transaction is committed.
118-
SET TX_ISOLATION='SERIALIZABLE';
118+
SET TRANSACTION_ISOLATION='SERIALIZABLE';
119119
SET AUTOCOMMIT=0;
120120
LOCK TABLES t1 READ;
121121
SELECT COUNT(*) > 0 FROM information_schema.tables;
122122
COUNT(*) > 0
123123
1
124124
DROP TABLE t2;
125125
UNLOCK TABLES;
126-
SET TX_ISOLATION=default;
126+
SET TRANSACTION_ISOLATION=default;
127127
SET AUTOCOMMIT=default;
128128
DROP TABLE t1, t3;
129129
DROP VIEW v1;

mysql-test/r/mix2_myisam.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -965,8 +965,8 @@ SET sql_mode = default;
965965
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=MyISAM;
966966
BEGIN;
967967
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
968-
SELECT @@tx_isolation,@@global.tx_isolation;
969-
@@tx_isolation @@global.tx_isolation
968+
SELECT @@transaction_isolation, @@global.transaction_isolation;
969+
@@transaction_isolation @@global.transaction_isolation
970970
SERIALIZABLE REPEATABLE-READ
971971
insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David');
972972
select id, code, name from t1 order by id;

mysql-test/r/partition_innodb.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -416,12 +416,12 @@ PARTITION p2 VALUES LESS THAN MAXVALUE
416416
);
417417
INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4), (5,5), (6,6), (7,7), (8,8),
418418
(9,9), (10,10), (11,11);
419-
SET @old_tx_isolation := @@session.tx_isolation;
419+
SET @old_transaction_isolation := @@session.transaction_isolation;
420420
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
421421
SET autocommit = 0;
422422
UPDATE t1 SET DATA = data*2 WHERE id = 3;
423423
UPDATE t1 SET data = data*2 WHERE data = 2;
424-
SET @@session.tx_isolation = @old_tx_isolation;
424+
SET @@session.transaction_isolation = @old_transaction_isolation;
425425
DROP TABLE t1;
426426
# Bug#37721, test of ORDER BY on PK and WHERE on INDEX
427427
CREATE TABLE t1 (

mysql-test/r/ps.result

+6-6
Original file line numberDiff line numberDiff line change
@@ -714,21 +714,21 @@ set @@time_zone:='Japan';
714714
execute stmt;
715715
@@time_zone
716716
Japan
717-
prepare stmt from "select @@tx_isolation";
717+
prepare stmt from "select @@transaction_isolation";
718718
execute stmt;
719-
@@tx_isolation
719+
@@transaction_isolation
720720
REPEATABLE-READ
721721
set transaction isolation level read committed;
722722
execute stmt;
723-
@@tx_isolation
723+
@@transaction_isolation
724724
REPEATABLE-READ
725725
set transaction isolation level serializable;
726726
execute stmt;
727-
@@tx_isolation
727+
@@transaction_isolation
728728
REPEATABLE-READ
729-
set @@tx_isolation=default;
729+
set @@transaction_isolation=default;
730730
execute stmt;
731-
@@tx_isolation
731+
@@transaction_isolation
732732
REPEATABLE-READ
733733
deallocate prepare stmt;
734734
prepare stmt from "create temporary table t1 (letter enum('','a','b','c')

0 commit comments

Comments
 (0)