summaryrefslogtreecommitdiff
path: root/mysql-test/suite/s3
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-06-10 21:14:13 +0300
committerMonty <monty@mariadb.org>2020-06-14 19:39:43 +0300
commitd7a9cdc627e59b3dbb91c8878ab74d62e0fdb3ce (patch)
tree2475063d16dcdf591792dcbe9791afa23dc09a9d /mysql-test/suite/s3
parentb3179b7e3294b8e6869283b69d1ab811b7a86944 (diff)
downloadmariadb-git-d7a9cdc627e59b3dbb91c8878ab74d62e0fdb3ce.tar.gz
Fixed hang in Aria page cache with concurrent SELECT
MDEV-20302 Server hangs upon concurrent SELECT from partitioned S3
Diffstat (limited to 'mysql-test/suite/s3')
-rw-r--r--mysql-test/suite/s3/alter2.result27
-rw-r--r--mysql-test/suite/s3/alter2.test33
2 files changed, 60 insertions, 0 deletions
diff --git a/mysql-test/suite/s3/alter2.result b/mysql-test/suite/s3/alter2.result
index d2849905c67..b15d2b1eb96 100644
--- a/mysql-test/suite/s3/alter2.result
+++ b/mysql-test/suite/s3/alter2.result
@@ -20,3 +20,30 @@ connection con1;
disconnect con1;
connection default;
DROP TABLE t1;
+#
+# MDEV-20302 Server hangs upon concurrent SELECT from partitioned S3
+# table
+#
+CREATE TABLE t1 (
+pk INT AUTO_INCREMENT,
+c CHAR(12),
+PRIMARY KEY(pk),
+KEY(c)
+) ENGINE=Aria
+PARTITION BY KEY(pk) PARTITIONS 2;
+CREATE VIEW v1 AS SELECT * FROM t1;
+INSERT INTO t1 VALUES (NULL,'ill'),(NULL,'loop');
+ALTER TABLE t1 ENGINE=S3;
+connect con1,localhost,root,,test;
+SELECT * FROM t1 WHERE c BETWEEN 'bar' AND 'foo';
+connection default;
+SELECT pk FROM v1;
+pk
+1
+2
+connection con1;
+pk c
+disconnect con1;
+connection default;
+DROP VIEW v1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/s3/alter2.test b/mysql-test/suite/s3/alter2.test
index de2bc001298..0be82f5a7ff 100644
--- a/mysql-test/suite/s3/alter2.test
+++ b/mysql-test/suite/s3/alter2.test
@@ -1,4 +1,5 @@
--source include/have_s3.inc
+--source include/have_partition.inc
--source create_database.inc
--echo #
@@ -26,6 +27,38 @@ SELECT * FROM t1;
--connection default
DROP TABLE t1;
+--echo #
+--echo # MDEV-20302 Server hangs upon concurrent SELECT from partitioned S3
+--echo # table
+--echo #
+
+CREATE TABLE t1 (
+ pk INT AUTO_INCREMENT,
+ c CHAR(12),
+ PRIMARY KEY(pk),
+ KEY(c)
+) ENGINE=Aria
+ PARTITION BY KEY(pk) PARTITIONS 2;
+
+CREATE VIEW v1 AS SELECT * FROM t1;
+INSERT INTO t1 VALUES (NULL,'ill'),(NULL,'loop');
+ALTER TABLE t1 ENGINE=S3;
+
+--connect (con1,localhost,root,,test)
+--send
+ SELECT * FROM t1 WHERE c BETWEEN 'bar' AND 'foo';
+
+--connection default
+SELECT pk FROM v1;
+
+--connection con1
+--reap
+
+--disconnect con1
+--connection default
+DROP VIEW v1;
+DROP TABLE t1;
+
#
# clean up
#