1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-09 08:01:34 +03:00

Merge branch '10.2' into 10.3

This commit is contained in:
Sergei Golubchik
2018-06-30 16:39:20 +02:00
273 changed files with 4467 additions and 1284 deletions

View 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;

View File

@@ -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;

View 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;