diff options
Diffstat (limited to 'mysql-test/suite/vcol')
-rw-r--r-- | mysql-test/suite/vcol/inc/vcol_ins_upd.inc | 3 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_misc.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_select_innodb.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_select_myisam.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc | 10 | ||||
-rw-r--r-- | mysql-test/suite/vcol/t/vcol_misc.test | 4 |
9 files changed, 31 insertions, 7 deletions
diff --git a/mysql-test/suite/vcol/inc/vcol_ins_upd.inc b/mysql-test/suite/vcol/inc/vcol_ins_upd.inc index 8cf0fb9e..c523083d 100644 --- a/mysql-test/suite/vcol/inc/vcol_ins_upd.inc +++ b/mysql-test/suite/vcol/inc/vcol_ins_upd.inc @@ -29,6 +29,8 @@ let $create4 = create table t1 (a int, d varchar(16)); eval $create1; set sql_warnings = 1; +# Prefer table scans to range +set @@optimizer_scan_setup_cost=0; --echo # --echo # *** INSERT *** @@ -197,6 +199,7 @@ select * from t1; --echo # UPDATE tbl_name SET non-vcol=expr --echo # WHERE vcol=between const1 and const2 ORDER BY vcol LIMIT 2 insert into t1 (a) values (1), (2), (3), (4), (5); + select * from t1; update t1 set a=6 where c between -1 and 0 order by c limit 2; diff --git a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result index 425aa1b1..71f1348d 100644 --- a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result +++ b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result @@ -1,4 +1,13 @@ SET @@session.default_storage_engine = 'MyISAM'; +# AES_ENCRYPT() without the mode (4th argument) +create or replace table t1 (b blob as (aes_encrypt('abc', 'bcd')) PERSISTENT); +ERROR HY000: Function or expression 'aes_encrypt()' cannot be used in the GENERATED ALWAYS AS clause of `b` +create or replace table t1 (b blob as (aes_encrypt('abc', 'bcd','def')) PERSISTENT); +ERROR HY000: Function or expression 'aes_encrypt()' cannot be used in the GENERATED ALWAYS AS clause of `b` +create or replace table t1 (b blob as (aes_decrypt('abc', 'bcd')) PERSISTENT); +ERROR HY000: Function or expression 'aes_decrypt()' cannot be used in the GENERATED ALWAYS AS clause of `b` +create or replace table t1 (b blob as (aes_decrypt('abc', 'bcd','def')) PERSISTENT); +ERROR HY000: Function or expression 'aes_decrypt()' cannot be used in the GENERATED ALWAYS AS clause of `b` # RAND() create or replace table t1 (b double as (rand())); create or replace table t1 (b double as (rand()) PERSISTENT); diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result index 6807f89f..624477d2 100644 --- a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result @@ -3,6 +3,7 @@ create table t1 (a int, b int as (-a), c int as (-a) persistent); set sql_warnings = 1; +set @@optimizer_scan_setup_cost=0; # # *** INSERT *** # diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result index 43206dba..823b4f52 100644 --- a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result @@ -3,6 +3,7 @@ create table t1 (a int, b int as (-a), c int as (-a) persistent); set sql_warnings = 1; +set @@optimizer_scan_setup_cost=0; # # *** INSERT *** # diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result index 3bb06116..710bd105 100644 --- a/mysql-test/suite/vcol/r/vcol_misc.result +++ b/mysql-test/suite/vcol/r/vcol_misc.result @@ -181,8 +181,8 @@ a b c 2 3 y 0 1 y,n drop table t1,t2; -SET @old_debug= @@global.debug; -SET @old_debug= @@global.debug; +SET @old_debug= @@global.debug_dbug; +SET @old_debug= @@global.debug_dbug; SET GLOBAL debug_dbug= "+d,write_delay_wakeup"; CREATE TABLE t1 (a int, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, diff --git a/mysql-test/suite/vcol/r/vcol_select_innodb.result b/mysql-test/suite/vcol/r/vcol_select_innodb.result index 40308b6e..57a17cbe 100644 --- a/mysql-test/suite/vcol/r/vcol_select_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_select_innodb.result @@ -135,7 +135,7 @@ count(distinct c) 3 explain select count(distinct c) from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by +1 SIMPLE t1 range NULL c 5 NULL 5 Using index for group-by ### ### filesort & range-based utils ### diff --git a/mysql-test/suite/vcol/r/vcol_select_myisam.result b/mysql-test/suite/vcol/r/vcol_select_myisam.result index 05f86347..8964eda1 100644 --- a/mysql-test/suite/vcol/r/vcol_select_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_select_myisam.result @@ -74,7 +74,7 @@ a b c explain select * from t1 where c in (select c from t3 where c between -2 and -1); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t3 range c c 5 NULL 2 Using where; Using index -1 PRIMARY t1 ref c c 5 test.t3.c 2 +1 PRIMARY t1 ref c c 5 test.t3.c 1 # select_type=UNION, type=system # select_type=UNION RESULT, type=<union1,2> select * from t1 union select * from t2; @@ -133,7 +133,7 @@ count(distinct c) 3 explain select count(distinct c) from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by +1 SIMPLE t1 range NULL c 5 NULL 5 Using index for group-by ### ### filesort & range-based utils ### diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc index 52324176..d7dbba01 100644 --- a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc +++ b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc @@ -19,6 +19,16 @@ # to check for things that should not work for either VIRTUAL or PERSISTENT # +--echo # AES_ENCRYPT() without the mode (4th argument) +-- error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (b blob as (aes_encrypt('abc', 'bcd')) PERSISTENT); +-- error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (b blob as (aes_encrypt('abc', 'bcd','def')) PERSISTENT); +-- error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (b blob as (aes_decrypt('abc', 'bcd')) PERSISTENT); +-- error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (b blob as (aes_decrypt('abc', 'bcd','def')) PERSISTENT); + --echo # RAND() create or replace table t1 (b double as (rand())); -- error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test index 83a06e83..d788f502 100644 --- a/mysql-test/suite/vcol/t/vcol_misc.test +++ b/mysql-test/suite/vcol/t/vcol_misc.test @@ -181,8 +181,8 @@ drop table t1,t2; # Bug mdev-3938: INSERT DELAYED for a table with virtual columns # -SET @old_debug= @@global.debug; -SET @old_debug= @@global.debug; +SET @old_debug= @@global.debug_dbug; +SET @old_debug= @@global.debug_dbug; SET GLOBAL debug_dbug= "+d,write_delay_wakeup"; CREATE TABLE t1 (a int, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, |