diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:04:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:04:16 +0000 |
commit | a68fb2d8219f6bccc573009600e9f23e89226a5e (patch) | |
tree | d742d35d14ae816e99293d2b01face30e9f3a46b /storage/columnstore/mysql-test | |
parent | Initial commit. (diff) | |
download | mariadb-10.6-upstream.tar.xz mariadb-10.6-upstream.zip |
Adding upstream version 1:10.6.11.upstream/1%10.6.11upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/columnstore/mysql-test')
6 files changed, 62 insertions, 0 deletions
diff --git a/storage/columnstore/mysql-test/columnstore/include/cleanup_columnstore.inc b/storage/columnstore/mysql-test/columnstore/include/cleanup_columnstore.inc new file mode 100644 index 00000000..c1286a5e --- /dev/null +++ b/storage/columnstore/mysql-test/columnstore/include/cleanup_columnstore.inc @@ -0,0 +1,4 @@ +--disable_query_log +DROP FUNCTION IF EXISTS mcssystemready; +--enable_query_log + diff --git a/storage/columnstore/mysql-test/columnstore/include/have_columnstore.inc b/storage/columnstore/mysql-test/columnstore/include/have_columnstore.inc new file mode 100644 index 00000000..f6b97fed --- /dev/null +++ b/storage/columnstore/mysql-test/columnstore/include/have_columnstore.inc @@ -0,0 +1,13 @@ +if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'columnstore' AND support IN ('YES', 'DEFAULT', 'ENABLED')`) +{ + --skip Test requires engine ColumnStore. +} + +--disable_query_log +CREATE FUNCTION mcssystemready RETURNS INTEGER SONAME 'ha_columnstore.so'; +--enable_query_log + +if (`SELECT mcssystemready() = 0`) +{ + --skip Test requires ColumnStore to be running +} diff --git a/storage/columnstore/mysql-test/columnstore/r/basic.result b/storage/columnstore/mysql-test/columnstore/r/basic.result new file mode 100644 index 00000000..3be76759 --- /dev/null +++ b/storage/columnstore/mysql-test/columnstore/r/basic.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a INT, b VARCHAR(255)) ENGINE=columnstore; +INSERT INTO t1 (a, b) VALUES (1, 'columnstore'), (2, 'test'); +SELECT * FROM t1; +a b +1 columnstore +2 test +UPDATE t1 SET a=a+100; +SELECT * FROM t1; +a b +101 columnstore +102 test +DELETE FROM t1 WHERE a=101; +SELECT * FROM t1; +a b +102 test +DROP TABLE t1; diff --git a/storage/columnstore/mysql-test/columnstore/suite.opt b/storage/columnstore/mysql-test/columnstore/suite.opt new file mode 100644 index 00000000..fbd322fd --- /dev/null +++ b/storage/columnstore/mysql-test/columnstore/suite.opt @@ -0,0 +1 @@ +--plugin-load-add=$HA_COLUMNSTORE_SO diff --git a/storage/columnstore/mysql-test/columnstore/suite.pm b/storage/columnstore/mysql-test/columnstore/suite.pm new file mode 100644 index 00000000..5579df40 --- /dev/null +++ b/storage/columnstore/mysql-test/columnstore/suite.pm @@ -0,0 +1,7 @@ +package My::Suite::ColumnStore; + +use My::SysInfo; + +@ISA = qw(My::Suite); + +bless { }; diff --git a/storage/columnstore/mysql-test/columnstore/t/basic.test b/storage/columnstore/mysql-test/columnstore/t/basic.test new file mode 100644 index 00000000..34ab07d7 --- /dev/null +++ b/storage/columnstore/mysql-test/columnstore/t/basic.test @@ -0,0 +1,20 @@ +--source include/have_columnstore.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (a INT, b VARCHAR(255)) ENGINE=columnstore; + +INSERT INTO t1 (a, b) VALUES (1, 'columnstore'), (2, 'test'); +SELECT * FROM t1; + +UPDATE t1 SET a=a+100; +SELECT * FROM t1; + +DELETE FROM t1 WHERE a=101; +SELECT * FROM t1; + +DROP TABLE t1; + +--source include/cleanup_columnstore.inc |