diff options
Diffstat (limited to 'mysql-test/suite/vcol/t')
31 files changed, 76 insertions, 117 deletions
diff --git a/mysql-test/suite/vcol/t/rpl_vcol.test b/mysql-test/suite/vcol/t/rpl_vcol.test index 03837df1b99..d893ebac855 100644 --- a/mysql-test/suite/vcol/t/rpl_vcol.test +++ b/mysql-test/suite/vcol/t/rpl_vcol.test @@ -28,7 +28,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_innodb.inc -SET @@session.storage_engine = 'InnoDB'; +SET @@session.default_storage_engine = 'InnoDB'; #------------------------------------------------------------------------------# # Cleanup diff --git a/mysql-test/suite/vcol/t/vcol_archive.test b/mysql-test/suite/vcol/t/vcol_archive.test index c0c9ecc445d..b708b3a451a 100644 --- a/mysql-test/suite/vcol/t/vcol_archive.test +++ b/mysql-test/suite/vcol/t/vcol_archive.test @@ -32,7 +32,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_archive.inc -SET @@session.storage_engine = 'archive'; +SET @@session.default_storage_engine = 'archive'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_blackhole.test b/mysql-test/suite/vcol/t/vcol_blackhole.test index eac074d9595..6cbc68a994f 100644 --- a/mysql-test/suite/vcol/t/vcol_blackhole.test +++ b/mysql-test/suite/vcol/t/vcol_blackhole.test @@ -32,7 +32,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_blackhole.inc -SET @@session.storage_engine = 'blackhole'; +SET @@session.default_storage_engine = 'blackhole'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs.test b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs.test index 3e9e5936476..d00ab8276e7 100644 --- a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs.test +++ b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs.test @@ -32,7 +32,7 @@ ##### Storage engine to be tested # Set the session storage engine -eval SET @@session.storage_engine = 'MyISAM'; +eval SET @@session.default_storage_engine = 'MyISAM'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test b/mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test index 38baa2b3024..6fb6a5040b1 100644 --- a/mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test @@ -34,7 +34,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_innodb.inc -eval SET @@session.storage_engine = 'InnoDB'; +eval SET @@session.default_storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_column_def_options_myisam.test b/mysql-test/suite/vcol/t/vcol_column_def_options_myisam.test index 5c3a4619834..63081429ada 100644 --- a/mysql-test/suite/vcol/t/vcol_column_def_options_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_column_def_options_myisam.test @@ -33,7 +33,7 @@ ##### Storage engine to be tested # Set the session storage engine -eval SET @@session.storage_engine = 'MyISAM'; +eval SET @@session.default_storage_engine = 'MyISAM'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_csv.test b/mysql-test/suite/vcol/t/vcol_csv.test index 75ddf819818..0c218df6388 100644 --- a/mysql-test/suite/vcol/t/vcol_csv.test +++ b/mysql-test/suite/vcol/t/vcol_csv.test @@ -32,7 +32,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_csv.inc -SET @@session.storage_engine = 'CSV'; +SET @@session.default_storage_engine = 'CSV'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_handler_aria.test b/mysql-test/suite/vcol/t/vcol_handler_aria.test index 9b69e600767..0787321e295 100644 --- a/mysql-test/suite/vcol/t/vcol_handler_aria.test +++ b/mysql-test/suite/vcol/t/vcol_handler_aria.test @@ -35,7 +35,7 @@ ##### Storage engine to be tested # Set the session storage engine -eval SET @@session.storage_engine = 'maria'; +eval SET @@session.default_storage_engine = 'maria'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_handler_innodb.test b/mysql-test/suite/vcol/t/vcol_handler_innodb.test index bf443c6bbd3..c86cbd0daae 100644 --- a/mysql-test/suite/vcol/t/vcol_handler_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_handler_innodb.test @@ -34,7 +34,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_innodb.inc -eval SET @@session.storage_engine = 'InnoDB'; +eval SET @@session.default_storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_handler_myisam.test b/mysql-test/suite/vcol/t/vcol_handler_myisam.test index 5aa16da180a..424752d9d23 100644 --- a/mysql-test/suite/vcol/t/vcol_handler_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_handler_myisam.test @@ -33,7 +33,7 @@ ##### Storage engine to be tested # Set the session storage engine -eval SET @@session.storage_engine = 'MyISAM'; +eval SET @@session.default_storage_engine = 'MyISAM'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test b/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test index 5d9ac12e930..fd1af0abd9e 100644 --- a/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test @@ -34,7 +34,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_innodb.inc -eval SET @@session.storage_engine = 'InnoDB'; +eval SET @@session.default_storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_ins_upd_myisam.test b/mysql-test/suite/vcol/t/vcol_ins_upd_myisam.test index 7840c191194..d73d0aa613c 100644 --- a/mysql-test/suite/vcol/t/vcol_ins_upd_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_ins_upd_myisam.test @@ -33,7 +33,7 @@ ##### Storage engine to be tested # Set the session storage engine -eval SET @@session.storage_engine = 'MyISAM'; +eval SET @@session.default_storage_engine = 'MyISAM'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_keys_innodb.test b/mysql-test/suite/vcol/t/vcol_keys_innodb.test index c475dd71a69..488a2b936d0 100644 --- a/mysql-test/suite/vcol/t/vcol_keys_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_keys_innodb.test @@ -34,7 +34,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_innodb.inc -SET @@session.storage_engine = 'InnoDB'; +SET @@session.default_storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs # none @@ -80,7 +80,7 @@ create table t1 ( col_enum enum('','a','b','c','d','e','f','foo','bar') not null default '', col_date date not null default '1900-01-01', col_timestamp timestamp(3) not null default '1971-01-01 00:00:00', - vcol_datetime datetime as (col_datetime) virtual, + vcol_datetime datetime as (truncate(col_datetime,0)) virtual, vcol_dec decimal(18,9) zerofill as (col_dec) virtual, vcol_bit bit(63) as (col_bit) virtual, vcol_char binary(51) as (col_char) virtual, diff --git a/mysql-test/suite/vcol/t/vcol_keys_myisam.test b/mysql-test/suite/vcol/t/vcol_keys_myisam.test index 6c3a94d2086..b8cbf9ef705 100644 --- a/mysql-test/suite/vcol/t/vcol_keys_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_keys_myisam.test @@ -35,7 +35,7 @@ ##### Storage engine to be tested # Set the session storage engine -SET @@session.storage_engine = 'MyISAM'; +SET @@session.default_storage_engine = 'MyISAM'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_memory.test b/mysql-test/suite/vcol/t/vcol_memory.test index f481427fa93..b78850ede89 100644 --- a/mysql-test/suite/vcol/t/vcol_memory.test +++ b/mysql-test/suite/vcol/t/vcol_memory.test @@ -31,7 +31,7 @@ ##### Storage engine to be tested # Set the session storage engine -SET @@session.storage_engine = 'memory'; +SET @@session.default_storage_engine = 'memory'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test b/mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test index 88ed6157294..8f7a467136d 100644 --- a/mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test @@ -36,7 +36,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_innodb.inc -eval SET @@session.storage_engine = 'InnoDB'; +eval SET @@session.default_storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_non_stored_columns_myisam.test b/mysql-test/suite/vcol/t/vcol_non_stored_columns_myisam.test index 32481e792ec..74c11ba8b7d 100644 --- a/mysql-test/suite/vcol/t/vcol_non_stored_columns_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_non_stored_columns_myisam.test @@ -35,7 +35,7 @@ ##### Storage engine to be tested # Set the session storage engine -eval SET @@session.storage_engine = 'MyISAM'; +eval SET @@session.default_storage_engine = 'MyISAM'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_partition_innodb.test b/mysql-test/suite/vcol/t/vcol_partition_innodb.test index 7790a82800c..7b8e8de25d4 100644 --- a/mysql-test/suite/vcol/t/vcol_partition_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_partition_innodb.test @@ -34,7 +34,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_innodb.inc -eval SET @@session.storage_engine = 'InnoDB'; +eval SET @@session.default_storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_partition_myisam.test b/mysql-test/suite/vcol/t/vcol_partition_myisam.test index 25f0d42c300..b41a2482fac 100644 --- a/mysql-test/suite/vcol/t/vcol_partition_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_partition_myisam.test @@ -34,7 +34,7 @@ ##### Storage engine to be tested # Set the session storage engine -eval SET @@session.storage_engine = 'MyISAM'; +eval SET @@session.default_storage_engine = 'MyISAM'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_select_innodb.test b/mysql-test/suite/vcol/t/vcol_select_innodb.test index 8b85d04bfb5..606801a213a 100644 --- a/mysql-test/suite/vcol/t/vcol_select_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_select_innodb.test @@ -35,7 +35,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_innodb.inc -eval SET @@session.storage_engine = 'InnoDB'; +eval SET @@session.default_storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_select_myisam.test b/mysql-test/suite/vcol/t/vcol_select_myisam.test index d60288d45ed..1e1adf29b3c 100644 --- a/mysql-test/suite/vcol/t/vcol_select_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_select_myisam.test @@ -34,7 +34,7 @@ ##### Storage engine to be tested # Set the session storage engine -eval SET @@session.storage_engine = 'MyISAM'; +eval SET @@session.default_storage_engine = 'MyISAM'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode.test b/mysql-test/suite/vcol/t/vcol_sql_mode.test index 44d3686ac01..f52345c7ffb 100644 --- a/mysql-test/suite/vcol/t/vcol_sql_mode.test +++ b/mysql-test/suite/vcol/t/vcol_sql_mode.test @@ -18,28 +18,24 @@ CREATE TABLE t1 (a CHAR(5), v INT AS (a) VIRTUAL, KEY(v)); SHOW CREATE TABLE t1; DROP TABLE t1; +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v TIME AS (a) VIRTUAL, KEY(v)); -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (c CHAR(8), v BINARY(8) AS (c), KEY(v)); SHOW WARNINGS; -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v BIT(64) AS (a) VIRTUAL, KEY(v)); SHOW WARNINGS; -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) VIRTUAL, KEY(v)); SHOW WARNINGS; -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(v(100))); SHOW WARNINGS; -DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + TRIM resolving dependency @@ -79,61 +75,52 @@ DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + TRIM not resolving dependency -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v TEXT AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v(100))); SHOW WARNINGS; -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING '' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH '' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING 'x' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH 'x' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; -DROP TABLE t1; # more than one space -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING ' ' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; -DROP TABLE t1; # more than one space -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH ' ' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; -DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + TRIM(... non_constant FROM a) -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a CHAR(5), b CHAR(5), v TEXT AS (TRIM(TRAILING b FROM a)) VIRTUAL, KEY(v(100))); SHOW WARNINGS; -DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + RPAD resolving dependency @@ -157,12 +144,11 @@ DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + RPAD not resolving dependency -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,4,' ')) VIRTUAL, KEY(v)); SHOW WARNINGS; -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a CHAR(5), b CHAR(5), @@ -170,7 +156,6 @@ CREATE TABLE t1 ( KEY(v) ); SHOW WARNINGS; -DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + comparison @@ -179,13 +164,12 @@ CREATE TABLE t1 (a CHAR(5), v INT AS (a='a') VIRTUAL, KEY(v)); SHOW CREATE TABLE t1; DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a CHAR(5) CHARACTER SET latin1 COLLATE latin1_nopad_bin, v INT AS (a='a') VIRTUAL, KEY(v) ); SHOW WARNINGS; -DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + LIKE @@ -198,25 +182,23 @@ CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE NULL) VIRTUAL, KEY(v)); SHOW CREATE TABLE t1; DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE 'a') VIRTUAL, KEY(v)); SHOW WARNINGS; -DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + LENGTH(char_column) = hard dependency -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v INT AS (LENGTH(a)) VIRTUAL, KEY(v)); SHOW WARNINGS; -DROP TABLE t1; --echo # --echo # Testing NO_UNSIGNED_SUBTRACTION --echo # -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, @@ -224,9 +206,8 @@ CREATE TABLE t1 ( KEY (c) ); SHOW WARNINGS; -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, @@ -234,9 +215,8 @@ CREATE TABLE t1 ( KEY (c) ); SHOW WARNINGS; -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, @@ -244,7 +224,6 @@ CREATE TABLE t1 ( KEY (c) ); SHOW WARNINGS; -DROP TABLE t1; CREATE TABLE t1 ( a INT UNSIGNED, @@ -271,7 +250,7 @@ DROP TABLE t1; --echo # Comnination: PAD_CHAR_TO_FULL_LENGTH + NO_UNSIGNED_SUBTRACTION --echo # -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, @@ -280,14 +259,13 @@ CREATE TABLE t1 ( KEY (v) ); SHOW WARNINGS; -DROP TABLE t1; # The below solves the dependency on NO_UNSIGNED_SUBTRACTION # but does not solve the dependency on PAD_CHAR_TO_FULL_LENGTH, # because the 'length' argument to RPAD() is not a constant. -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, @@ -296,7 +274,6 @@ CREATE TABLE t1 ( KEY (v) ); SHOW WARNINGS; -DROP TABLE t1; @@ -314,12 +291,10 @@ CREATE TABLE t1 ( c CHAR(5), v VARCHAR(5) GENERATED ALWAYS AS (c) VIRTUAL ); -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED ALTER TABLE t1 ADD KEY(v); SHOW WARNINGS; -ALTER TABLE t1 DROP KEY v; - -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE INDEX v ON t1 (v); SHOW WARNINGS; DROP TABLE t1; @@ -327,18 +302,16 @@ DROP TABLE t1; --echo # A virtual column on the second position in an index - cannot depend on sql_mode -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (id int, a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(id, v(100))); SHOW WARNINGS; -DROP TABLE t1; --echo # A persisten virtual column cannot depend on sql_mode -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) PERSISTENT); SHOW WARNINGS; -DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) PERSISTENT); SHOW CREATE TABLE t1; diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test b/mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test index bef1e09b719..19ebd9648a7 100644 --- a/mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test +++ b/mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test @@ -47,32 +47,29 @@ DROP TABLE t1; --echo # NOT OK: lower FSP + virtual index -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( t DATETIME(4), d DATETIME, v DATETIME(3) AS (t) VIRTUAL, KEY(v,d) ); -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( t DATETIME(4), d DATETIME, v DATETIME(3) AS (COALESCE(t)) VIRTUAL, KEY(v,d) ); -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( t DATETIME(4), d DATETIME, v DATETIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL, KEY(v,d) ); -DROP TABLE t1; --echo # OK: lower FSP + ROUND + virtual index @@ -110,13 +107,12 @@ SET sql_mode=DEFAULT; --echo # MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL --echo # -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a DATETIME(6), v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS DATETIME(3))) VIRTUAL, KEY (v) ); -DROP TABLE t1; CREATE TABLE t1 ( a DATETIME(6), diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_time.test b/mysql-test/suite/vcol/t/vcol_sql_mode_time.test index 05160a43ebb..2ce2a9eb5d7 100644 --- a/mysql-test/suite/vcol/t/vcol_sql_mode_time.test +++ b/mysql-test/suite/vcol/t/vcol_sql_mode_time.test @@ -47,32 +47,29 @@ DROP TABLE t1; --echo # NOT OK: lower FSP + virtual index -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( t TIME(4), d TIME, v TIME(3) AS (t) VIRTUAL, KEY(v,d) ); -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( t TIME(4), d TIME, v TIME(3) AS (COALESCE(t)) VIRTUAL, KEY(v,d) ); -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( t TIME(4), d TIME, v TIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL, KEY(v,d) ); -DROP TABLE t1; --echo # OK: lower FSP + ROUND + virtual index @@ -111,13 +108,12 @@ SET sql_mode=DEFAULT; --echo # MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL --echo # -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a TIME(6), v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS TIME(3))) VIRTUAL, KEY (v) ); -DROP TABLE t1; CREATE TABLE t1 ( a TIME(6), diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test b/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test index 4f38da75948..e3dee5828f0 100644 --- a/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test +++ b/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test @@ -47,32 +47,29 @@ DROP TABLE t1; --echo # NOT OK: lower FSP + virtual index -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( t TIMESTAMP(4), d DATETIME, v TIMESTAMP(3) AS (t) VIRTUAL, KEY(v,d) ); -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( t TIMESTAMP(4), d DATETIME, v TIMESTAMP(3) AS (COALESCE(t)) VIRTUAL, KEY(v,d) ); -DROP TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( t TIMESTAMP(4), d DATETIME, v TIMESTAMP(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL, KEY(v,d) ); -DROP TABLE t1; --echo # OK: lower FSP + ROUND + virtual index @@ -115,10 +112,11 @@ CREATE TABLE t1 ( b TIMESTAMP AS (a) VIRTUAL, KEY (b) ); +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED ALTER TABLE t1 MODIFY a BLOB FIRST; +SHOW WARNINGS; DROP TABLE t1; - --echo # --echo # End of 10.4 tests --echo # diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test b/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test index 26b76fbcfe1..71e34231ac1 100644 --- a/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test +++ b/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test @@ -25,21 +25,19 @@ SELECT * FROM t1; FLUSH TABLES; SELECT * FROM t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t2 LIKE t1; -DROP TABLE t2; FLUSH TABLES; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t2 LIKE t1; -DROP TABLE t2; SHOW CREATE TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED ALTER TABLE t1 ADD b INT DEFAULT a; SHOW CREATE TABLE t1; SELECT * FROM t1; FLUSH TABLES; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED ALTER TABLE t1 ADD c INT DEFAULT a; SELECT * FROM t1; DROP TABLE t1; @@ -92,20 +90,18 @@ SELECT * FROM t1; FLUSH TABLES; SELECT * FROM t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t2 LIKE t1; -DROP TABLE t2; FLUSH TABLES; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t2 LIKE t1; -DROP TABLE t2; SHOW CREATE TABLE t1; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED ALTER TABLE t1 ADD b INT DEFAULT a; FLUSH TABLES; -#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED ALTER TABLE t1 ADD c INT DEFAULT a; SELECT * FROM t1; DROP TABLE t1; diff --git a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs.test b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs.test index d1e21af059b..36c1ba09692 100644 --- a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs.test +++ b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs.test @@ -32,7 +32,7 @@ ##### Storage engine to be tested # Set the session storage engine -eval SET @@session.storage_engine = 'MyISAM'; +eval SET @@session.default_storage_engine = 'MyISAM'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test b/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test index 5a36fb1c06d..c35a1279629 100644 --- a/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test @@ -35,7 +35,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_innodb.inc -eval SET @@session.storage_engine = 'InnoDB'; +eval SET @@session.default_storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_trigger_sp_myisam.test b/mysql-test/suite/vcol/t/vcol_trigger_sp_myisam.test index c475a31eaa6..d5f36d805f1 100644 --- a/mysql-test/suite/vcol/t/vcol_trigger_sp_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_trigger_sp_myisam.test @@ -34,7 +34,7 @@ ##### Storage engine to be tested # Set the session storage engine -eval SET @@session.storage_engine = 'MyISAM'; +eval SET @@session.default_storage_engine = 'MyISAM'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_view_innodb.test b/mysql-test/suite/vcol/t/vcol_view_innodb.test index 01fced8e4c3..fd77489f5dc 100644 --- a/mysql-test/suite/vcol/t/vcol_view_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_view_innodb.test @@ -34,7 +34,7 @@ ##### Storage engine to be tested # Set the session storage engine --source include/have_innodb.inc -eval SET @@session.storage_engine = 'InnoDB'; +eval SET @@session.default_storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs # none diff --git a/mysql-test/suite/vcol/t/vcol_view_myisam.test b/mysql-test/suite/vcol/t/vcol_view_myisam.test index 2ebd36431bc..1b4a387a1ae 100644 --- a/mysql-test/suite/vcol/t/vcol_view_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_view_myisam.test @@ -33,7 +33,7 @@ ##### Storage engine to be tested # Set the session storage engine -eval SET @@session.storage_engine = 'MyISAM'; +eval SET @@session.default_storage_engine = 'MyISAM'; ##### Workarounds for known open engine specific bugs # none |