mirror of
https://github.com/MariaDB/server.git
synced 2025-12-07 17:42:39 +03:00
Merge mariadb-10.3.8 into 10.3
This commit is contained in:
39
mysql-test/suite/innodb/r/innodb_query_cache.result
Normal file
39
mysql-test/suite/innodb/r/innodb_query_cache.result
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# MDEV-16087 Inconsistent SELECT results when query cache is enabled
|
||||
#
|
||||
set GLOBAL query_cache_type=ON;
|
||||
set LOCAL query_cache_type=ON;
|
||||
create table t1 (id bigint(20) auto_increment, primary key (id)) ENGINE=InnoDB;
|
||||
create table t2 (id bigint(20) auto_increment, primary key (id)) ENGINE=InnoDB;
|
||||
create table t3 (id bigint(20) auto_increment, primary key (id)) ENGINE=InnoDB;
|
||||
connect con1,localhost,root;
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
select * from t2;
|
||||
id
|
||||
connection default;
|
||||
insert into t3 () values ();
|
||||
connection con1;
|
||||
insert into t1 () values ();
|
||||
select * from t3;
|
||||
id
|
||||
connect con2,localhost,root;
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
select * from t3;
|
||||
id
|
||||
1
|
||||
select * from t3;
|
||||
id
|
||||
1
|
||||
select sql_no_cache * from t3;
|
||||
id
|
||||
1
|
||||
rollback;
|
||||
connection con1;
|
||||
rollback;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
connection default;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
set GLOBAL query_cache_type=default;
|
||||
@@ -1,28 +0,0 @@
|
||||
#
|
||||
# BUG#27216817: INNODB: FAILING ASSERTION:
|
||||
# PREBUILT->TABLE->N_MYSQL_HANDLES_OPENED == 1
|
||||
#
|
||||
|
||||
source include/have_innodb.inc;
|
||||
create table t1 (a int not null, b int not null) engine=innodb;
|
||||
insert t1 values (1,2),(3,4);
|
||||
|
||||
lock table t1 write, t1 tr read;
|
||||
flush status;
|
||||
alter table t1 add primary key (b);
|
||||
show status like 'Handler_read_rnd_next';
|
||||
unlock tables;
|
||||
alter table t1 drop primary key;
|
||||
|
||||
lock table t1 write;
|
||||
flush status;
|
||||
alter table t1 add primary key (b);
|
||||
show status like 'Handler_read_rnd_next';
|
||||
unlock tables;
|
||||
alter table t1 drop primary key;
|
||||
|
||||
flush status;
|
||||
alter table t1 add primary key (b);
|
||||
show status like 'Handler_read_rnd_next';
|
||||
|
||||
drop table t1;
|
||||
47
mysql-test/suite/innodb/t/innodb_query_cache.test
Normal file
47
mysql-test/suite/innodb/t/innodb_query_cache.test
Normal file
@@ -0,0 +1,47 @@
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_query_cache.inc
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-16087 Inconsistent SELECT results when query cache is enabled
|
||||
--echo #
|
||||
|
||||
set GLOBAL query_cache_type=ON;
|
||||
set LOCAL query_cache_type=ON;
|
||||
|
||||
create table t1 (id bigint(20) auto_increment, primary key (id)) ENGINE=InnoDB;
|
||||
create table t2 (id bigint(20) auto_increment, primary key (id)) ENGINE=InnoDB;
|
||||
create table t3 (id bigint(20) auto_increment, primary key (id)) ENGINE=InnoDB;
|
||||
|
||||
connect (con1,localhost,root);
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
select * from t2;
|
||||
|
||||
connection default;
|
||||
insert into t3 () values ();
|
||||
|
||||
connection con1;
|
||||
insert into t1 () values ();
|
||||
select * from t3;
|
||||
|
||||
connect (con2,localhost,root);
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
select * from t3;
|
||||
select * from t3;
|
||||
select sql_no_cache * from t3;
|
||||
|
||||
rollback;
|
||||
|
||||
connection con1;
|
||||
|
||||
rollback;
|
||||
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
connection default;
|
||||
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
|
||||
set GLOBAL query_cache_type=default;
|
||||
Reference in New Issue
Block a user