summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-07-01 20:27:27 +0300
committerMonty <monty@mariadb.org>2020-07-01 20:27:27 +0300
commit36590b33a6175739f1fd7ee6427b1b5b4224bd3e (patch)
treebd32769ce770f87a57b2a1157945b76ff4fe6c0a
parentba731bdc6a80e88d32e7440044b548c3e3edc591 (diff)
downloadmariadb-git-36590b33a6175739f1fd7ee6427b1b5b4224bd3e.tar.gz
Added test of usage of two instances of a cached table
-rw-r--r--mysql-test/suite/columnstore_cache/basic.result29
-rw-r--r--mysql-test/suite/columnstore_cache/basic.test21
2 files changed, 50 insertions, 0 deletions
diff --git a/mysql-test/suite/columnstore_cache/basic.result b/mysql-test/suite/columnstore_cache/basic.result
index 31c525e0cfa..e5a38db7199 100644
--- a/mysql-test/suite/columnstore_cache/basic.result
+++ b/mysql-test/suite/columnstore_cache/basic.result
@@ -39,3 +39,32 @@ select count(*), sum(a) from t1;
count(*) sum(a)
18 1332
drop table t1,t2,t3;
+create table t1 (a int not null , b varchar(10) not null) engine=columnstore_cache;
+insert into t1 values (1,"1"),(2,"2"),(3,"3");
+lock table t1 read;
+select * from t1;
+a b
+1 1
+2 2
+3 3
+connect con1, localhost, root,,;
+select * from t1;
+a b
+1 1
+2 2
+3 3
+insert into t1 values (11,"1"),(12,"2"),(13,"3");;
+connection default;
+unlock tables;
+connection con1;
+disconnect con1;
+connection default;
+select * from t1;
+a b
+1 1
+2 2
+3 3
+11 1
+12 2
+13 3
+drop table t1;
diff --git a/mysql-test/suite/columnstore_cache/basic.test b/mysql-test/suite/columnstore_cache/basic.test
index dfea198ed29..30441036a8a 100644
--- a/mysql-test/suite/columnstore_cache/basic.test
+++ b/mysql-test/suite/columnstore_cache/basic.test
@@ -39,3 +39,24 @@ select count(*), sum(a) from t1;
insert into t1 select * from t1 as t4;
select count(*), sum(a) from t1;
drop table t1,t2,t3;
+
+#
+# Test usage of two instances of a table
+#
+
+create table t1 (a int not null , b varchar(10) not null) engine=columnstore_cache;
+insert into t1 values (1,"1"),(2,"2"),(3,"3");
+lock table t1 read;
+select * from t1;
+
+--connect (con1, localhost, root,,)
+select * from t1;
+--send insert into t1 values (11,"1"),(12,"2"),(13,"3");
+--connection default
+unlock tables;
+--connection con1
+reap;
+--disconnect con1
+--connection default
+select * from t1;
+drop table t1;