@@ -39,7 +39,7 @@ INDEX k2(c2)
39
39
INSERT INTO t3 (SELECT * FROM t1);
40
40
affected rows: 10
41
41
info: Records: 10 Duplicates: 0 Warnings: 0
42
- ########## innodb_wl6742_selects .inc ##########
42
+ ########## innodb_isolation_selects .inc ##########
43
43
SELECT * FROM t1;
44
44
c1 c2 c3 c4
45
45
1 1 1 1
@@ -121,7 +121,7 @@ DELETE FROM t1 WHERE c1 = 6;
121
121
affected rows: 1
122
122
DELETE FROM t3 WHERE c1 = 6;
123
123
affected rows: 1
124
- ########## innodb_wl6742_selects .inc ##########
124
+ ########## innodb_isolation_selects .inc ##########
125
125
SELECT * FROM t1;
126
126
c1 c2 c3 c4
127
127
1 3 1 1
@@ -194,7 +194,7 @@ COUNT(*)
194
194
#
195
195
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
196
196
BEGIN;
197
- ########## innodb_wl6742_selects .inc ##########
197
+ ########## innodb_isolation_selects .inc ##########
198
198
SELECT * FROM t1;
199
199
c1 c2 c3 c4
200
200
1 1 1 1
@@ -275,7 +275,7 @@ INSERT INTO t1(c2,c3,c4) VALUES (100, 1, 1);
275
275
affected rows: 1
276
276
INSERT INTO t3(c2,c3,c4) VALUES (100, 1, 1);
277
277
affected rows: 1
278
- ########## innodb_wl6742_selects .inc ##########
278
+ ########## innodb_isolation_selects .inc ##########
279
279
SELECT * FROM t1;
280
280
c1 c2 c3 c4
281
281
1 1 1 1
@@ -353,7 +353,7 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
353
353
#
354
354
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
355
355
BEGIN;
356
- ########## innodb_wl6742_selects .inc ##########
356
+ ########## innodb_isolation_selects .inc ##########
357
357
SELECT * FROM t1;
358
358
c1 c2 c3 c4
359
359
1 1 1 1
@@ -431,7 +431,7 @@ INSERT INTO t1(c2,c3,c4) VALUES (1000, 1, 1);
431
431
affected rows: 1
432
432
INSERT INTO t3(c2,c3,c4) VALUES (1000, 1, 1);
433
433
affected rows: 1
434
- ########## innodb_wl6742_selects .inc ##########
434
+ ########## innodb_isolation_selects .inc ##########
435
435
SELECT * FROM t1;
436
436
c1 c2 c3 c4
437
437
1 1 1 1
@@ -503,7 +503,7 @@ COUNT(*)
503
503
#
504
504
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
505
505
BEGIN;
506
- ########## innodb_wl6742_selects .inc ##########
506
+ ########## innodb_isolation_selects .inc ##########
507
507
SELECT * FROM t1;
508
508
c1 c2 c3 c4
509
509
1 3 1 1
@@ -583,7 +583,7 @@ DELETE FROM t1 WHERE c1 in(9);
583
583
affected rows: 1
584
584
DELETE FROM t3 WHERE c1 in(9);
585
585
affected rows: 1
586
- ########## innodb_wl6742_selects .inc ##########
586
+ ########## innodb_isolation_selects .inc ##########
587
587
SELECT * FROM t1;
588
588
c1 c2 c3 c4
589
589
1 3 1 1
@@ -652,7 +652,7 @@ COUNT(*)
652
652
#
653
653
# Connection default REPEATABLE READ
654
654
#
655
- ########## innodb_wl6742_selects .inc ##########
655
+ ########## innodb_isolation_selects .inc ##########
656
656
SELECT * FROM t1;
657
657
c1 c2 c3 c4
658
658
1 3 1 1
@@ -723,7 +723,7 @@ COUNT(*)
723
723
#
724
724
# Connection 1 REPEATABLE READ
725
725
#
726
- ########## innodb_wl6742_selects .inc ##########
726
+ ########## innodb_isolation_selects .inc ##########
727
727
SELECT * FROM t1;
728
728
c1 c2 c3 c4
729
729
1 1 1 1
@@ -793,7 +793,7 @@ COUNT(*)
793
793
#
794
794
# Connection 2 READ COMMITTED
795
795
#
796
- ########## innodb_wl6742_selects .inc ##########
796
+ ########## innodb_isolation_selects .inc ##########
797
797
SELECT * FROM t1;
798
798
c1 c2 c3 c4
799
799
1 1 1 1
@@ -863,7 +863,7 @@ COUNT(*)
863
863
#
864
864
# Connection 3 READ UNCOMMITTED
865
865
#
866
- ########## innodb_wl6742_selects .inc ##########
866
+ ########## innodb_isolation_selects .inc ##########
867
867
SELECT * FROM t1;
868
868
c1 c2 c3 c4
869
869
1 3 1 1
@@ -930,7 +930,7 @@ COUNT(*)
930
930
4
931
931
###############################################
932
932
COMMIT;
933
- ########## innodb_wl6742_selects .inc ##########
933
+ ########## innodb_isolation_selects .inc ##########
934
934
SELECT * FROM t1;
935
935
c1 c2 c3 c4
936
936
1 3 1 1
@@ -999,7 +999,7 @@ COUNT(*)
999
999
#
1000
1000
# Connection 2 READ COMMITTED
1001
1001
#
1002
- ########## innodb_wl6742_selects .inc ##########
1002
+ ########## innodb_isolation_selects .inc ##########
1003
1003
SELECT * FROM t1;
1004
1004
c1 c2 c3 c4
1005
1005
1 1 1 1
@@ -1067,7 +1067,7 @@ COUNT(*)
1067
1067
4
1068
1068
###############################################
1069
1069
COMMIT;
1070
- ########## innodb_wl6742_selects .inc ##########
1070
+ ########## innodb_isolation_selects .inc ##########
1071
1071
SELECT * FROM t1;
1072
1072
c1 c2 c3 c4
1073
1073
1 1 1 1
@@ -1137,7 +1137,7 @@ COUNT(*)
1137
1137
#
1138
1138
# Connection 1 REPEATABLE READ
1139
1139
#
1140
- ########## innodb_wl6742_selects .inc ##########
1140
+ ########## innodb_isolation_selects .inc ##########
1141
1141
SELECT * FROM t1;
1142
1142
c1 c2 c3 c4
1143
1143
1 1 1 1
@@ -1214,7 +1214,7 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
1214
1214
SELECT COUNT(*) FROM t1 FOR UPDATE;
1215
1215
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
1216
1216
COMMIT;
1217
- ########## innodb_wl6742_selects .inc ##########
1217
+ ########## innodb_isolation_selects .inc ##########
1218
1218
SELECT * FROM t1;
1219
1219
c1 c2 c3 c4
1220
1220
1 1 1 1
@@ -1291,17 +1291,17 @@ Warnings:
1291
1291
Note 1003 /* select#1 */ select `test`.`t1`.`c1` AS `c1`,`test`.`t1`.`c2` AS `c2`,`test`.`t1`.`c3` AS `c3`,`test`.`t1`.`c4` AS `c4` from `test`.`t1`
1292
1292
EXPLAIN SELECT COUNT(*) FROM t1;
1293
1293
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1294
- 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
1294
+ 1 SIMPLE t1 NULL index NULL k2 5 NULL 9 100.00 Using index
1295
1295
Warnings:
1296
1296
Note 1003 /* select#1 */ select count(0) AS `COUNT(*)` from `test`.`t1`
1297
1297
EXPLAIN SELECT COUNT(*) FROM t3;
1298
1298
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1299
- 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
1299
+ 1 SIMPLE t3 p0,p1,p2,p3 index NULL k2 5 NULL 9 100.00 Using index
1300
1300
Warnings:
1301
1301
Note 1003 /* select#1 */ select count(0) AS `COUNT(*)` from `test`.`t3`
1302
1302
EXPLAIN SELECT COUNT(c1) FROM t1;
1303
1303
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1304
- 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
1304
+ 1 SIMPLE t1 NULL index NULL k2 5 NULL 9 100.00 Using index
1305
1305
Warnings:
1306
1306
Note 1003 /* select#1 */ select count(`test`.`t1`.`c1`) AS `COUNT(c1)` from `test`.`t1`
1307
1307
EXPLAIN SELECT COUNT(c2) FROM t1;
@@ -1336,26 +1336,26 @@ Warnings:
1336
1336
Note 1003 /* select#1 */ select avg(`test`.`t3`.`c1`) AS `AVG(c1)`,max(`test`.`t3`.`c1`) AS `MAX(c1)`,min(`test`.`t3`.`c2`) AS `MIN(c2)`,avg(`test`.`t3`.`c3`) AS `AVG(c3)`,sum(`test`.`t3`.`c4`) AS `SUM(c4)` from `test`.`t3`
1337
1337
EXPLAIN SELECT c1, c2 FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2);
1338
1338
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1339
- 1 PRIMARY t1 NULL index PRIMARY k2 5 NULL # 100.00 Using where; Using index
1340
- 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL # NULL Select tables optimized away
1339
+ 1 PRIMARY t1 NULL range PRIMARY PRIMARY 4 NULL # 100.00 Using where
1340
+ 2 SUBQUERY t1 NULL index NULL k2 5 NULL # 100.00 Using index
1341
1341
Warnings:
1342
1342
Note 1003 /* select#1 */ select `test`.`t1`.`c1` AS `c1`,`test`.`t1`.`c2` AS `c2` from `test`.`t1` where (`test`.`t1`.`c1` > <cache>(((/* select#2 */ select count(0) from `test`.`t1`) / 2)))
1343
1343
EXPLAIN SELECT c1, c2 FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t3) / 2);
1344
1344
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1345
- 1 PRIMARY t1 NULL index PRIMARY k2 5 NULL # 100.00 Using where; Using index
1346
- 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL # NULL Select tables optimized away
1345
+ 1 PRIMARY t1 NULL range PRIMARY PRIMARY 4 NULL # 100.00 Using where
1346
+ 2 SUBQUERY t3 p0,p1,p2,p3 index NULL k2 5 NULL # 100.00 Using index
1347
1347
Warnings:
1348
1348
Note 1003 /* select#1 */ select `test`.`t1`.`c1` AS `c1`,`test`.`t1`.`c2` AS `c2` from `test`.`t1` where (`test`.`t1`.`c1` > <cache>(((/* select#2 */ select count(0) from `test`.`t3`) / 2)))
1349
1349
EXPLAIN SELECT COUNT(c2) FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2);
1350
1350
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1351
- 1 PRIMARY t1 NULL index PRIMARY k2 5 NULL # 100.00 Using where; Using index
1352
- 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL # NULL Select tables optimized away
1351
+ 1 PRIMARY t1 NULL range PRIMARY PRIMARY 4 NULL # 100.00 Using where
1352
+ 2 SUBQUERY t1 NULL index NULL k2 5 NULL # 100.00 Using index
1353
1353
Warnings:
1354
1354
Note 1003 /* select#1 */ select count(`test`.`t1`.`c2`) AS `COUNT(c2)` from `test`.`t1` where (`test`.`t1`.`c1` > <cache>(((/* select#2 */ select count(0) from `test`.`t1`) / 2)))
1355
1355
EXPLAIN SELECT COUNT(c2) FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t3) / 2);
1356
1356
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1357
- 1 PRIMARY t1 NULL index PRIMARY k2 5 NULL # 100.00 Using where; Using index
1358
- 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL # NULL Select tables optimized away
1357
+ 1 PRIMARY t1 NULL range PRIMARY PRIMARY 4 NULL # 100.00 Using where
1358
+ 2 SUBQUERY t3 p0,p1,p2,p3 index NULL k2 5 NULL # 100.00 Using index
1359
1359
Warnings:
1360
1360
Note 1003 /* select#1 */ select count(`test`.`t1`.`c2`) AS `COUNT(c2)` from `test`.`t1` where (`test`.`t1`.`c1` > <cache>(((/* select#2 */ select count(0) from `test`.`t3`) / 2)))
1361
1361
EXPLAIN SELECT COUNT(*) FROM t1 WHERE c1 > (SELECT AVG(c1) FROM t1);
@@ -1379,7 +1379,7 @@ ALTER TABLE t2 row_format=redundant;
1379
1379
# Connection default REPEATABLE READ
1380
1380
# Do more DML in the default REPEATABLE READ transaction in order to use recently committed records.
1381
1381
#
1382
- ########## innodb_wl6742_selects .inc ##########
1382
+ ########## innodb_isolation_selects .inc ##########
1383
1383
SELECT * FROM t1;
1384
1384
c1 c2 c3 c4
1385
1385
1 3 1 1
@@ -1451,7 +1451,7 @@ info: Rows matched: 9 Changed: 9 Warnings: 0
1451
1451
UPDATE t3 SET c4 = c2 * 10;
1452
1452
affected rows: 9
1453
1453
info: Rows matched: 9 Changed: 9 Warnings: 0
1454
- ########## innodb_wl6742_selects .inc ##########
1454
+ ########## innodb_isolation_selects .inc ##########
1455
1455
SELECT * FROM t1;
1456
1456
c1 c2 c3 c4
1457
1457
1 3 1 30
@@ -1536,7 +1536,7 @@ COMMIT;
1536
1536
SELECT COUNT(*) FROM t2;
1537
1537
COUNT(*)
1538
1538
10
1539
- ########## innodb_wl6742_selects .inc ##########
1539
+ ########## innodb_isolation_selects .inc ##########
1540
1540
SELECT * FROM t1;
1541
1541
c1 c2 c3 c4
1542
1542
1 3 1 30
@@ -1605,7 +1605,7 @@ COUNT(*)
1605
1605
#
1606
1606
# Connection 2
1607
1607
#
1608
- ########## innodb_wl6742_selects .inc ##########
1608
+ ########## innodb_isolation_selects .inc ##########
1609
1609
SELECT * FROM t1;
1610
1610
c1 c2 c3 c4
1611
1611
1 3 1 30
@@ -1866,7 +1866,7 @@ INSERT INTO t1(c1) SELECT c1 + 100 FROM t1;
1866
1866
CREATE TABLE t2 SELECT * FROM t1;
1867
1867
EXPLAIN SELECT COUNT(*) FROM t1;
1868
1868
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1869
- 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
1869
+ 1 SIMPLE t1 NULL index NULL c2_idx 4 NULL 12 100.00 Using index
1870
1870
Warnings:
1871
1871
Note 1003 /* select#1 */ select count(0) AS `COUNT(*)` from `test`.`t1`
1872
1872
EXPLAIN SELECT COUNT(*) FROM t1 FORCE INDEX(c2_idx);
@@ -1876,7 +1876,8 @@ Warnings:
1876
1876
Note 1003 /* select#1 */ select count(0) AS `COUNT(*)` from `test`.`t1` FORCE INDEX (`c2_idx`)
1877
1877
EXPLAIN SELECT COUNT(*) FROM t1, t2;
1878
1878
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1879
- 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
1879
+ 1 SIMPLE t1 NULL index NULL c2_idx 4 NULL 12 100.00 Using index
1880
+ 1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 12 100.00 Using join buffer (Block Nested Loop)
1880
1881
Warnings:
1881
1882
Note 1003 /* select#1 */ select count(0) AS `COUNT(*)` from `test`.`t1` join `test`.`t2`
1882
1883
EXPLAIN SELECT COUNT(*) FROM t1 FORCE INDEX(c2_idx), t2;
0 commit comments