1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Mtrfix kp 220926 (#2580)

* Update mcol_2000.test

* Update mcs117_create_utf8.test

* Update mcs12_alter_table.test

* Update mcs13_alter_table_negative.test

* Update mcs169_bin_functions.test

* Update mcs171_null_functions.test

* Update mcs173_coalesce_function.test

* Update mcs174_case_function.test

* Update mcs175_convert_functions.test

* Update mcs176_if_function.test

* Update mcs178_adddate_function.test

* Update mcs179_addtime_function.test

* Update mcs180_ascii_function.test

* Update mcs181_between_and.test

* Update mcs182_char_length_function.test

* Update mcs183_date_function.test

* Update mcs184_day_function.test

* Update mcs185_dayname_function.test

* Update mcs186_dayofyear_function.test

* Update mcs187_dayofmonth_function.test

* Update mcs1_create_table_data_types.test

* Update mcs19_grant_revoke.test

* Update mcs229_data_compression_type.test

* Update mcs28_load_data_local_infile.test

* Update mcs2_create_table_valid_names.test

* Update mcs5_create_table_from_other_tables.test

* Update mcs74_check_constraint.test

* Update mcs7_create_table_with_metadata.test

* Update mcs87_alter_column.test

* Update mcs8_create_table_with_constraints.test

* Update disabled.def

* Update mcs19_grant_revoke.test

* Update mcs19_grant_revoke.test

* Update mcs19_grant_revoke.test
This commit is contained in:
mariadb-KirillPerov
2022-10-07 14:36:29 +06:00
committed by GitHub
parent 2606c91afd
commit 85a6121f76
31 changed files with 85 additions and 3 deletions

View File

@ -63,9 +63,13 @@ alter table copy1 engine=columnstore;
create table copy2 like copy1;
create table copy3 engine=columnstore as select * from orig;
--replace_regex /(COLLATE utf8mb3_general_ci )// /(COLLATE utf8mb4_general_ci )// /( COLLATE=koi8r_general_ci)//
show create table orig;
--replace_regex /(COLLATE utf8mb3_general_ci )// /(COLLATE utf8mb4_general_ci )// /( COLLATE=koi8r_general_ci)//
show create table copy1;
--replace_regex /(COLLATE utf8mb3_general_ci )// /(COLLATE utf8mb4_general_ci )// /( COLLATE=koi8r_general_ci)//
show create table copy2;
--replace_regex /(COLLATE utf8mb3_general_ci )// /(COLLATE utf8mb4_general_ci )// /( COLLATE=koi8r_general_ci)// /( COLLATE=latin1_swedish_ci)//
show create table copy3;
drop table orig;

View File

@ -26,6 +26,8 @@ CREATE TABLE имя_таблицы_в_кодировке_утф8_длиной_б
(
имя_поля_в_кодировке_утф8_длиной_большеем_45 INT
)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE имя_таблицы_в_кодировке_утф8_длиной_большеем_48;
CREATE VIEW имя_вью_кодировке_утф8_длиной_большеем_42 AS SELECT * FROM имя_таблицы_в_кодировке_утф8_длиной_большеем_48;

View File

@ -21,16 +21,20 @@ ALTER TABLE t1 ENGINE=INNODB;
INSERT INTO t1 VALUES (3, 'c'),(4, 'd');
ALTER TABLE mcs12_db1.t1 ENGINE=Columnstore;
INSERT INTO mcs12_db1.t1 VALUES (3, 'c'),(4, 'd');
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE mcs12_db1.t1;
SELECT * FROM mcs12_db1.t1;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT * FROM t1;
# Rename
ALTER TABLE t1 RENAME t2;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t2;
SELECT * FROM t2;
ALTER TABLE t2 RENAME TO mcs12_db1.t1;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT * FROM t1;
# Cross db rename errors in CS but not in innodb. Need to check.
@ -45,16 +49,19 @@ INSERT INTO t1 VALUES (1, 'a'),(2, 'b');
ALTER TABLE t1 ADD t TIMESTAMP;
ALTER TABLE t1 ADD COLUMN i2 INT COMMENT 'Add one more column.';
INSERT INTO t1 VALUES (1, 'a', '2020-07-08', 11);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
# Drop column
ALTER TABLE t1 DROP COLUMN t;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT * FROM t1;
# Modify column
ALTER TABLE t1 CHANGE i new_i INTEGER;
INSERT INTO t1 VALUES (2, 'b', 22);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT * FROM t1;
@ -65,6 +72,7 @@ CREATE TABLE t1 (i INTEGER) ENGINE=Columnstore;
connect (addconroot1, localhost, root,,);
connect (addconroot2, localhost, root,,);
connection addconroot1;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE mcs12_db1.t1;
ALTER TABLE mcs12_db1.t1 ADD COLUMN c CHAR(10);
INSERT INTO mcs12_db1.t1 VALUES (1, 'a'),(2, 'b');
@ -79,6 +87,7 @@ ALTER TABLE mcs12_db1.t1 ADD COLUMN i2 INT COMMENT 'Add one more column.';
INSERT INTO mcs12_db1.t1 VALUES (5, 'e', 55);
connection default;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE mcs12_db1.t1;
SELECT * FROM mcs12_db1.t1;
disconnect addconroot1;

View File

@ -21,6 +21,7 @@ ALTER TABLE t1 ENGINE=;
ALTER TABLE t1 ENGINE=Invalid;
--error 1286
ALTER TABLE t1 ENGINE='#!~@$%^&*()_+-,.*`~';
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
# Rename
@ -62,6 +63,7 @@ connection addconroot1;
--error 1069
ALTER TABLE mcs13_db1.t1 ADD KEY k1(c1);
connection default;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE mcs13_db1.t1;
SELECT * FROM mcs13_db1.t1;
disconnect addconroot1;

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE);
INSERT INTO t1 VALUES ('', NULL, '0-0-0', NULL),('a', 12, '1212-12-12', 1.19691E+100),('b', 13, '1313-3-13 13:13:13', 2.1961E+18),('c', 14, '1414-4-14', 0.16191),('d', 15, '2015-5-15 15:15:15', 1.971917);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT BIN(2);

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE);
INSERT INTO t1 VALUES ('', NULL, '0-0-0', NULL),('a', 12, '1212-12-12', 1.19691E+100),('b', 13, '1313-3-13 13:13:13', 2.1961E+18),('c', 14, '1414-4-14', 0.16191),('d', 15, '2015-5-15 15:15:15', 1.971917);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT IFNULL(NULL, 'abc');

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE);
INSERT INTO t1 VALUES ('', NULL, '0-0-0', NULL),('a', 12, '1212-12-12', 1.19691E+100),('b', 13, '1313-3-13 13:13:13', 2.1961E+18),('c', 14, '1414-4-14', 0.16191),('d', 15, '2015-5-15 15:15:15', 1.971917);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT COALESCE(NULL, NULL, NULL, 'mariadb', NULL, 'columnstore');

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE);
INSERT INTO t1 VALUES ('', NULL, '0-0-0', NULL),('a', 12, '1212-12-12', 1.19691E+100),('b', 13, '1313-3-13 13:13:13', 2.1961E+18),('c', 14, '1414-4-14', 0.16191),('d', 15, '2015-5-15 15:15:15', 1.971917);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT b, c, (CASE WHEN a = 'b' THEN b ELSE c END) FROM t1;

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE);
INSERT INTO t1 VALUES ('', NULL, '0-0-0', NULL),('a', 12, '1212-12-12', 1.19691E+100),('b', 13, '1313-3-13 13:13:13', 2.1961E+18),('c', 14, '1414-4-14', 0.16191),('d', 15, '2015-5-15 15:15:15', 1.971917);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT CONVERT(123, CHAR);

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE);
INSERT INTO t1 VALUES ('', NULL, '0-0-0', NULL),('a', 12, '1212-12-12', 1.19691E+100),('b', 13, '1313-3-13 13:13:13', 2.1961E+18),('c', 14, '1414-4-14', 0.16191),('d', 15, '2015-5-15 15:15:15', 1.971917);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT IF(10<20, 1, 2);

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE);
INSERT INTO t1 VALUES ('', NULL, '0-0-0', NULL),('a', 12, '1212-12-12', 1.19691E+100),('b', 13, '1313-3-13 13:13:13', 2.1961E+18),('c', 14, '1414-4-14', 0.16191),('d', 15, '2015-5-15 15:15:15', 1.971917);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT ADDDATE('2020-02-02 22:22:22', 1);

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE);
INSERT INTO t1 VALUES ('', NULL, '0-0-0', NULL),('a', 12, '1212-12-12', 1.19691E+100),('b', 13, '1313-3-13 13:13:13', 2.1961E+18),('c', 14, '1414-4-14', 0.16191),('d', 15, '2015-5-15 15:15:15', 1.971917);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT ADDTIME('2020-02-02 22:22:22', '2 1:1:1');

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a CHAR(1), b INT);
INSERT INTO t1 VALUES ('', NULL), ('m', 6), ('N', 5), ('o', 4);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT ASCII(0);

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE);
INSERT INTO t1 VALUES ('', NULL, '0-0-0', NULL),('a', 12, '1212-12-12', 1.19691E+100),('b', 13, '1313-3-13 13:13:13', 2.1961E+18),('c', 14, '1414-4-14', 0.16191),('d', 15, '2015-5-15 15:15:15', 1.971917);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT 1 BETWEEN 2 AND 3;

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a VARCHAR(20));
INSERT INTO t1 VALUES (repeat('a', 5)), (repeat('b', 10)), (repeat('c', 20));
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT CHAR_LENGTH('MariaDB');
@ -28,6 +29,7 @@ SELECT a, CHARACTER_LENGTH(a) FROM t1 ORDER BY a;
DROP TABLE t1;
CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE);
INSERT INTO t1 VALUES ('', NULL, '0-0-0', NULL),('a', 12, '1212-12-12', 1.19691E+100),('b', 13, '1313-3-13 13:13:13', 2.1961E+18),('c', 14, '1414-4-14', 0.16191),('d', 15, '2015-5-15 15:15:15', 1.971917);
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT a, CHARACTER_LENGTH(a) FROM t1 ORDER BY a;

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a DATE, b DATETIME);
INSERT INTO t1 VALUES ('0-0-0', '0-0-0 0:0:0'), ('1212-12-12', '1111-11-11 11:11:11'), ('3333-03-03', '3333-3-3 3:33:33');
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT DATE('1212-12-12 11:11:11');

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a DATE, b DATETIME);
INSERT INTO t1 VALUES ('0-0-0', '0-0-0 0:0:0'), ('1212-12-12', '1111-11-11 11:11:11'), ('3333-03-03', '3333-3-3 3:33:33');
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT DAY('1212-12-12 11:11:11');

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a DATE, b DATETIME);
INSERT INTO t1 VALUES ('0-0-0', '0-0-0 0:0:0'), ('1212-12-12', '1212-12-11 11:11:11'), ('3333-03-03', '3333-3-4 3:33:33');
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT DAYNAME('1212-12-12 11:11:11');

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a DATE, b DATETIME);
INSERT INTO t1 VALUES ('0-0-0', '0-0-0 0:0:0'), ('1212-12-12', '1212-12-11 11:11:11'), ('3333-03-03', '3333-3-4 3:33:33');
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT DAYOFYEAR('1212-12-12 11:11:11');

View File

@ -15,6 +15,7 @@ SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a DATE, b DATETIME);
INSERT INTO t1 VALUES ('0-0-0', '0-0-0 0:0:0'), ('1212-12-12', '1212-12-11 11:11:11'), ('3333-03-03', '3333-3-4 3:33:33');
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT DAYOFMONTH('1212-12-12 11:11:11');

View File

@ -41,6 +41,7 @@ USE mcs19_db;
--error ER_DBACCESS_DENIED_ERROR
CREATE DATABASE mcs19_db1;
CREATE TABLE t1(col INT) ENGINE=InnoDB;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(1);
SELECT * FROM t1;
@ -56,12 +57,14 @@ SELECT USER();
SHOW GRANTS FOR 'user1'@'localhost';
--error ER_DBACCESS_DENIED_ERROR
USE mcs19_db;
--error ER_TABLEACCESS_DENIED_ERROR
--disable_abort_on_error
--replace_regex /(`mcs19_db`.`t1`)/'t1'/
INSERT INTO mcs19_db.t1 VALUES(2);
--error ER_TABLEACCESS_DENIED_ERROR
--replace_regex /(`mcs19_db`.`t1`)/'t1'/
SELECT * FROM mcs19_db.t1;
--error ER_TABLEACCESS_DENIED_ERROR
--replace_regex /(`mcs19_db`.`t1`)/'t1'/
CREATE TABLE mcs19_db.t1;
--enable_abort_on_error
# Clean up
connection default;

View File

@ -26,6 +26,7 @@ CREATE TABLE t1
t1_BIGINT BIGINT,
t1_BIGINT_UNSIGNED BIGINT UNSIGNED
)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
# Test Decimal datatypes
@ -38,6 +39,7 @@ CREATE TABLE t2
t2_FLOAT FLOAT,
t2_FLOAT_UNSIGNED FLOAT UNSIGNED
)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t2;
# Test String datatypes
@ -55,6 +57,7 @@ CREATE TABLE t3
t3_MEDIUMTEXT MEDIUMTEXT,
t3_LONGTEXT LONGTEXT
)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t3;
# Test Date and Time datatypes
@ -68,6 +71,7 @@ CREATE TABLE t4
t4_TIMESTAMP TIMESTAMP,
t4_TIMESTAMP_5 TIMESTAMP(5)
)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t4;
# Test with mixed datatypes
@ -83,6 +87,7 @@ CREATE TABLE t5
t5_TIME TIME,
t5_TIMESTAMP TIMESTAMP
)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t5;
# Clean UP

View File

@ -34,6 +34,7 @@ CREATE TABLE t1
t1_DATE DATE,
t1_TIME TIME
)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
set columnstore_compression_type=1;
@ -45,6 +46,7 @@ CREATE TABLE t2
t2_DATE DATE,
t2_TIME TIME
)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t2;
SELECT `schema`, tablename, columnname, compressiontype FROM calpontsys.syscolumn WHERE `schema`='mcs229_db' ORDER BY 2;

View File

@ -44,6 +44,7 @@ TRUNCATE TABLE t1;
--eval LOAD DATA LOCAL infile '$datafile' IGNORE INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY '' LINES TERMINATED BY '' IGNORE 1 LINES;
# The empty line last comes from the end line field in the file
SELECT * FROM t1;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
# Clean up

View File

@ -13,24 +13,32 @@ USE mcs2_db;
# Table name with numbers
CREATE TABLE 1234table(col1 INT)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE 1234table;
CREATE TABLE table5678(col1 INT)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE table5678;
CREATE TABLE 1234table5678(col1 INT)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE 1234table5678;
CREATE TABLE tab09le(col1 INT)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE tab09le;
CREATE TABLE `table_`(col1 INT)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE `table_`;
CREATE TABLE `table_13579`(col1 INT)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE `table_13579`;
# Table name with max length i.e, 64
CREATE TABLE abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl(col1 INT)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl;
# MCOL-4110: ColumnStore cannot handle case sensitive database and table name
CREATE TABLE abcdefghijklmnopqrstuvwxyz(col1 INT)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE abcdefghijklmnopqrstuvwxyz;
DROP DATABASE mcs2_db;

View File

@ -16,20 +16,28 @@ CREATE TABLE t1_ctas (c0 int, c1 char(20)) ENGINE=Columnstore;
INSERT INTO t1_ctas VALUES (1, 'foo'), (2, 'bar'), (3, 'disco');
CREATE TABLE t2 ENGINE=Columnstore AS SELECT * FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t2;
CREATE TABLE t3(col0 varchar(45) DEFAULT 'abc') ENGINE=Columnstore AS SELECT * FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t3;
CREATE TABLE t4(col0 varchar(45)) ENGINE=Columnstore AS SELECT * FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t4;
CREATE TABLE t5(c0 int) ENGINE=Columnstore AS SELECT * FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t5;
CREATE TABLE t6(c0 int) ENGINE=Columnstore AS SELECT c1 FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t6;
CREATE TABLE t7 ENGINE=Columnstore SELECT c1 AS c11 FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t7;
CREATE TABLE t8 ENGINE=Columnstore SELECT c0,c1 FROM t1_ctas WHERE c1='bar';
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t8;
CREATE TABLE t9(col0 varchar(45), c0 int DEFAULT 10) ENGINE=Columnstore SELECT * FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t9;
# 'create table as select' statement with innodb engine
@ -37,30 +45,40 @@ CREATE TABLE t2_ctas (c0 int, c1 char(20), PRIMARY KEY (c1))ENGINE=Innodb;
INSERT INTO t2_ctas VALUES (1, 'foo'), (2, 'bar'), (3, 'disco');
CREATE TABLE t10 ENGINE=Columnstore AS SELECT * FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t10;
CREATE TABLE t11(col0 varchar(45) DEFAULT 'abc') ENGINE=Columnstore AS SELECT * FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t11;
CREATE TABLE t12(col0 varchar(45)) ENGINE=Columnstore AS SELECT * FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t12;
CREATE TABLE t13(c0 int) ENGINE=Columnstore AS SELECT * FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t13;
CREATE TABLE t14(c0 int) ENGINE=Columnstore AS SELECT c1 FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t14;
CREATE TABLE t15 ENGINE=Columnstore SELECT c1 AS c11 FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t15;
CREATE TABLE t16 ENGINE=Columnstore SELECT c0,c1 FROM t1_ctas WHERE c1='bar';
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t16;
CREATE TABLE t17(col0 varchar(45), c0 int DEFAULT 10) ENGINE=Columnstore SELECT * FROM t1_ctas;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t17;
# create table using 'like' statement with columnstore engine
CREATE TABLE t1_like(c0 int, c1 char(20)) ENGINE=Columnstore;
CREATE TABLE t18 LIKE t1_like;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t18;
# create table using 'like' statement with innodb engine
CREATE TABLE t2_like(c0 int, c1 char(20), PRIMARY KEY (c1))ENGINE=Innodb;
CREATE TABLE t19 LIKE t2_like;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t19;
DROP DATABASE mcs5_db;

View File

@ -12,6 +12,7 @@ CREATE DATABASE mcs74_db;
USE mcs74_db;
CREATE TABLE t1(t1_int INT, t1_char CHAR(5), CHECK (t1_int > 0))ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(NULL, '');
INSERT INTO t1 VALUES(1, 'a');
@ -22,6 +23,7 @@ INSERT INTO t1 VALUES(-1, 'c');
SELECT * FROM t1;
CREATE TABLE t2(t1_char CHAR(10), CONSTRAINT c1 CHECK(t1_char = ''))ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t2;
INSERT INTO t2 VALUES();
INSERT INTO t2 VALUES('');
@ -37,6 +39,7 @@ CREATE TABLE t3(
CONSTRAINT t3_check_decimal CHECK(t3_decimal < 888.88),
CONSTRAINT t3_check_blob CHECK(t3_blob = 'aaaa')
)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t3;
INSERT INTO t3(t3_decimal) VALUES(NULL);
INSERT INTO t3(t3_decimal) VALUES(888.87);

View File

@ -13,16 +13,19 @@ USE mcs7_db;
CREATE TABLE t1 (c1 VARCHAR(30), c2 INTEGER COMMENT '0123456789') COMMENT='abcdefghijklmnopqrstuvwxyz' ENGINE=Columnstore;
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1' AND table_schema='mcs7_db';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1' AND table_schema='mcs7_db';
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
CREATE TABLE t2 (c1 INTEGER COMMENT '0123456789') ENGINE=Columnstore;
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t2' AND table_schema='mcs7_db';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t2' AND table_schema='mcs7_db';
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t2;
CREATE TABLE t3 (c1 VARCHAR(40))COMMENT='abcdefghijklmnopqrstuvwxyz' ENGINE=Columnstore;
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t3' AND table_schema='mcs7_db';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t3' AND table_schema='mcs7_db';
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t3;
#negative scenarios. max comment length for column is 1024 bytes and for a table it is 2048 bytes

View File

@ -62,6 +62,7 @@ ALTER TABLE t1 DROP COLUMN IF EXISTS c11;
ALTER TABLE t1 DROP COLUMN c11;
ALTER TABLE t1 DROP COLUMN IF EXISTS c11;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT * FROM t1 ORDER BY c1;

View File

@ -11,13 +11,16 @@ CREATE DATABASE mcs8_db;
USE mcs8_db;
CREATE TABLE t1(col1 SMALLINT DEFAULT 10)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
CREATE TABLE t2(col1 TINYINT NOT NULL)ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t2;
# Indexes and Keys aren't supported in MCS
--error 1064
CREATE INDEX on t2(col1);
CREATE TABLE t3(col1 INT, CHECK (col1>=10))ENGINE=Columnstore;
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t3;
--error 1069
CREATE TABLE t4(col1 INT PRIMARY KEY AUTO_INCREMENT)ENGINE=Columnstore;