1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge 10.2 into 10.3

This commit is contained in:
Marko Mäkelä
2019-12-12 14:41:51 +02:00
46 changed files with 2708 additions and 2933 deletions

View File

@ -1,4 +1,5 @@
create table t1(c1 integer not null,c2 integer not null, key (c1)) engine=InnoDb;
create table t1(c1 integer not null,c2 integer not null, key (c1))
ENGINE=InnoDB STATS_PERSISTENT=1;
create view v1 as select * from t1 where c1 in (0,1);
insert t1 select 0,seq from seq_1_to_500;
insert t1 select 1,seq from seq_1_to_100;
@ -47,8 +48,8 @@ rollback;
start transaction;
explain delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL c1 NULL NULL NULL 502 Using where
2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 58 Using index
1 PRIMARY t1 range c1 c1 4 NULL 600 Using where
2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 83 Using index
delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1;
affected rows: 1
delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1;
@ -63,8 +64,8 @@ rollback;
start transaction;
explain delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL c1 NULL NULL NULL 502 Using where
2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 58 Using index
1 PRIMARY t1 ALL c1 NULL NULL NULL 670 Using where
2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 83 Using index
delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 ;
affected rows: 500
select count(*) from v1 where c1=0;