diff options
38 files changed, 84 insertions, 103 deletions
diff --git a/mysql-test/include/have_xtradb.inc b/mysql-test/include/have_xtradb.inc index 6c2fc5155a9..3f3893e5642 100644 --- a/mysql-test/include/have_xtradb.inc +++ b/mysql-test/include/have_xtradb.inc @@ -1,4 +1,5 @@ -disable_query_log; ---require r/true.require -SELECT (plugin_description LIKE '%xtradb%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active'; -enable_query_log; +if (!`SELECT count(*) FROM information_schema.plugins WHERE + plugin_name = 'innodb' AND plugin_status = 'active' AND + plugin_description LIKE '%xtradb%'`){ + skip Need XtraDB engine; +} diff --git a/mysql-test/include/have_xtradb.opt b/mysql-test/include/have_xtradb.opt new file mode 100644 index 00000000000..4fb96229a7b --- /dev/null +++ b/mysql-test/include/have_xtradb.opt @@ -0,0 +1,2 @@ +--loose-innodb +--plugin-load=$HA_XTRADB_SO diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result index f8321520880..cee912ffb2e 100644 --- a/mysql-test/r/log_tables.result +++ b/mysql-test/r/log_tables.result @@ -248,13 +248,13 @@ set global slow_query_log='OFF'; set @save_storage_engine= @@session.storage_engine; set storage_engine= MEMORY; alter table mysql.slow_log engine=ndb; -ERROR HY000: This storage engine cannot be used for log tables" +ERROR HY000: This storage engine cannot be used for log tables alter table mysql.slow_log engine=innodb; -ERROR HY000: This storage engine cannot be used for log tables" +ERROR HY000: This storage engine cannot be used for log tables alter table mysql.slow_log engine=archive; -ERROR HY000: This storage engine cannot be used for log tables" +ERROR HY000: This storage engine cannot be used for log tables alter table mysql.slow_log engine=blackhole; -ERROR HY000: This storage engine cannot be used for log tables" +ERROR HY000: This storage engine cannot be used for log tables set storage_engine= @save_storage_engine; drop table mysql.slow_log; drop table mysql.general_log; diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result index ec9d804d6da..98be0326ef0 100644 --- a/mysql-test/r/plugin.result +++ b/mysql-test/r/plugin.result @@ -75,9 +75,9 @@ SET SQL_MODE='IGNORE_BAD_TABLE_OPTIONS'; #illegal value fixed CREATE TABLE t1 (a int) ENGINE=example ULL=10000000000000000000 one_or_two='ttt' YESNO=SSS; Warnings: -Warning 1652 Incorrect value '10000000000000000000' for option 'ULL' -Warning 1652 Incorrect value 'ttt' for option 'one_or_two' -Warning 1652 Incorrect value 'SSS' for option 'YESNO' +Warning 1653 Incorrect value '10000000000000000000' for option 'ULL' +Warning 1653 Incorrect value 'ttt' for option 'one_or_two' +Warning 1653 Incorrect value 'SSS' for option 'YESNO' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/r/table_options.result b/mysql-test/r/table_options.result index ed6fe4fb3de..ddb7bd13c03 100644 --- a/mysql-test/r/table_options.result +++ b/mysql-test/r/table_options.result @@ -3,9 +3,9 @@ SET @OLD_SQL_MODE=@@SQL_MODE; SET SQL_MODE='IGNORE_BAD_TABLE_OPTIONS'; create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1='1v1'; Warnings: -Warning 1651 Unknown option 'fkey' -Warning 1651 Unknown option 'dff' -Warning 1651 Unknown option 'tkey1' +Warning 1652 Unknown option 'fkey' +Warning 1652 Unknown option 'dff' +Warning 1652 Unknown option 'tkey1' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -16,10 +16,10 @@ drop table t1; #reassiginig options in the same line create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1=1v1 TKEY1=DEFAULT tkey1=1v2 tkey2=2v1; Warnings: -Warning 1651 Unknown option 'fkey' -Warning 1651 Unknown option 'dff' -Warning 1651 Unknown option 'tkey1' -Warning 1651 Unknown option 'tkey2' +Warning 1652 Unknown option 'fkey' +Warning 1652 Unknown option 'dff' +Warning 1652 Unknown option 'tkey1' +Warning 1652 Unknown option 'tkey2' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -29,7 +29,7 @@ t1 CREATE TABLE `t1` ( #add option alter table t1 tkey4=4v1; Warnings: -Warning 1651 Unknown option 'tkey4' +Warning 1652 Unknown option 'tkey4' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -39,8 +39,8 @@ t1 CREATE TABLE `t1` ( #remove options alter table t1 tkey3=DEFAULT tkey4=DEFAULT; Warnings: -Warning 1651 Unknown option 'tkey3' -Warning 1651 Unknown option 'tkey4' +Warning 1652 Unknown option 'tkey3' +Warning 1652 Unknown option 'tkey4' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -50,11 +50,11 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a int fkey1=v1, key akey (a) kkey1=v1) tkey1=1v1 tkey1=1v2 TKEY1=DEFAULT tkey2=2v1 tkey3=3v1; Warnings: -Warning 1651 Unknown option 'fkey1' -Warning 1651 Unknown option 'kkey1' -Warning 1651 Unknown option 'TKEY1' -Warning 1651 Unknown option 'tkey2' -Warning 1651 Unknown option 'tkey3' +Warning 1652 Unknown option 'fkey1' +Warning 1652 Unknown option 'kkey1' +Warning 1652 Unknown option 'TKEY1' +Warning 1652 Unknown option 'tkey2' +Warning 1652 Unknown option 'tkey3' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -64,7 +64,7 @@ t1 CREATE TABLE `t1` ( #change field with option with the same value alter table t1 change a a int `FKEY1`='v1'; Warnings: -Warning 1651 Unknown option 'FKEY1' +Warning 1652 Unknown option 'FKEY1' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -74,7 +74,7 @@ t1 CREATE TABLE `t1` ( #change field with option with a different value alter table t1 change a a int fkey1=v2; Warnings: -Warning 1651 Unknown option 'fkey1' +Warning 1652 Unknown option 'fkey1' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -93,7 +93,7 @@ t1 CREATE TABLE `t1` ( #new key with options alter table t1 add key bkey (b) kkey2=v1; Warnings: -Warning 1651 Unknown option 'kkey2' +Warning 1652 Unknown option 'kkey2' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -105,8 +105,8 @@ t1 CREATE TABLE `t1` ( #new column with options alter table t1 add column c int fkey1=v1 fkey2=v2; Warnings: -Warning 1651 Unknown option 'fkey1' -Warning 1651 Unknown option 'fkey2' +Warning 1652 Unknown option 'fkey1' +Warning 1652 Unknown option 'fkey2' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -141,7 +141,7 @@ t1 CREATE TABLE `t1` ( #add column with options after delete alter table t1 add column b int fkey2=v1; Warnings: -Warning 1651 Unknown option 'fkey2' +Warning 1652 Unknown option 'fkey2' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -154,7 +154,7 @@ t1 CREATE TABLE `t1` ( #add key alter table t1 add key bkey (b) kkey2=v2; Warnings: -Warning 1651 Unknown option 'kkey2' +Warning 1652 Unknown option 'kkey2' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -168,7 +168,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a int) tkey1=100; Warnings: -Warning 1651 Unknown option 'tkey1' +Warning 1652 Unknown option 'tkey1' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/vcol/inc/vcol_unsupported_storage_engines.inc b/mysql-test/suite/vcol/inc/vcol_unsupported_storage_engines.inc index 681ed77fb3c..4ec98ebf3f4 100644 --- a/mysql-test/suite/vcol/inc/vcol_unsupported_storage_engines.inc +++ b/mysql-test/suite/vcol/inc/vcol_unsupported_storage_engines.inc @@ -13,9 +13,9 @@ # Change: Syntax changed ################################################################################ ---error ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN +--error ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS create table t1 (a int, b int as (a+1)); -create table t1 (a int); ---error ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN +create table t1 (a int not null); +--error ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS alter table t1 add column b int as (a+1); drop table t1; diff --git a/mysql-test/suite/vcol/r/vcol_archive.result b/mysql-test/suite/vcol/r/vcol_archive.result index 83fb78a5592..5ed2f3768ca 100644 --- a/mysql-test/suite/vcol/r/vcol_archive.result +++ b/mysql-test/suite/vcol/r/vcol_archive.result @@ -1,7 +1,7 @@ SET @@session.storage_engine = 'archive'; create table t1 (a int, b int as (a+1)); -ERROR HY000: 'Specified storage engine' is not yet supported for computed columns -create table t1 (a int); +ERROR HY000: ARCHIVE storage engine does not support computed columns +create table t1 (a int not null); alter table t1 add column b int as (a+1); -ERROR HY000: 'Specified storage engine' is not yet supported for computed columns +ERROR HY000: ARCHIVE storage engine does not support computed columns drop table t1; diff --git a/mysql-test/suite/vcol/r/vcol_blackhole.result b/mysql-test/suite/vcol/r/vcol_blackhole.result index 15e7505aebb..2d33937a2f1 100644 --- a/mysql-test/suite/vcol/r/vcol_blackhole.result +++ b/mysql-test/suite/vcol/r/vcol_blackhole.result @@ -1,7 +1,7 @@ SET @@session.storage_engine = 'blackhole'; create table t1 (a int, b int as (a+1)); -ERROR HY000: 'Specified storage engine' is not yet supported for computed columns -create table t1 (a int); +ERROR HY000: BLACKHOLE storage engine does not support computed columns +create table t1 (a int not null); alter table t1 add column b int as (a+1); -ERROR HY000: 'Specified storage engine' is not yet supported for computed columns +ERROR HY000: BLACKHOLE storage engine does not support computed columns drop table t1; diff --git a/mysql-test/suite/vcol/r/vcol_csv.result b/mysql-test/suite/vcol/r/vcol_csv.result index 97977505696..920e614c0b1 100644 --- a/mysql-test/suite/vcol/r/vcol_csv.result +++ b/mysql-test/suite/vcol/r/vcol_csv.result @@ -1,7 +1,7 @@ SET @@session.storage_engine = 'CSV'; create table t1 (a int, b int as (a+1)); -ERROR HY000: 'Specified storage engine' is not yet supported for computed columns +ERROR HY000: CSV storage engine does not support computed columns create table t1 (a int not null); alter table t1 add column b int as (a+1); -ERROR HY000: 'Specified storage engine' is not yet supported for computed columns +ERROR HY000: CSV storage engine does not support computed columns drop table t1; diff --git a/mysql-test/suite/vcol/r/vcol_memory.result b/mysql-test/suite/vcol/r/vcol_memory.result index 30b6bd4a4bf..4503c51e39a 100644 --- a/mysql-test/suite/vcol/r/vcol_memory.result +++ b/mysql-test/suite/vcol/r/vcol_memory.result @@ -1,7 +1,7 @@ SET @@session.storage_engine = 'memory'; create table t1 (a int, b int as (a+1)); -ERROR HY000: 'Specified storage engine' is not yet supported for computed columns -create table t1 (a int); +ERROR HY000: MEMORY storage engine does not support computed columns +create table t1 (a int not null); alter table t1 add column b int as (a+1); -ERROR HY000: 'Specified storage engine' is not yet supported for computed columns +ERROR HY000: MEMORY storage engine does not support computed columns drop table t1; diff --git a/mysql-test/suite/vcol/r/vcol_merge.result b/mysql-test/suite/vcol/r/vcol_merge.result index 03a1e151c2e..4b5ed838c3a 100644 --- a/mysql-test/suite/vcol/r/vcol_merge.result +++ b/mysql-test/suite/vcol/r/vcol_merge.result @@ -4,5 +4,5 @@ create table t2 (a int, b int as (a % 10)); insert into t1 values (1,default); insert into t2 values (2,default); create table t3 (a int, b int as (a % 10)) engine=MERGE UNION=(t1,t2); -ERROR HY000: 'Specified storage engine' is not yet supported for computed columns +ERROR HY000: MRG_MYISAM storage engine does not support computed columns drop table t1,t2; diff --git a/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result b/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result index c638ced4f41..0379a71922d 100644 --- a/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result @@ -76,7 +76,7 @@ drop table t1; # Case 7. ALTER. Modify virtual stored -> virtual non-stored create table t1 (a int, b int as (a % 2) persistent); alter table t1 modify b int as (a % 2); -ERROR HY000: 'Changing the STORED status' is not yet supported for computed columns +ERROR HY000: This is not yet supported for computed columns show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -87,7 +87,7 @@ drop table t1; # Case 8. ALTER. Modify virtual non-stored -> virtual stored create table t1 (a int, b int as (a % 2)); alter table t1 modify b int as (a % 2) persistent; -ERROR HY000: 'Changing the STORED status' is not yet supported for computed columns +ERROR HY000: This is not yet supported for computed columns show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result b/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result index be42b8b76c4..de9a962ac2c 100644 --- a/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result @@ -76,7 +76,7 @@ drop table t1; # Case 7. ALTER. Modify virtual stored -> virtual non-stored create table t1 (a int, b int as (a % 2) persistent); alter table t1 modify b int as (a % 2); -ERROR HY000: 'Changing the STORED status' is not yet supported for computed columns +ERROR HY000: This is not yet supported for computed columns show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -87,7 +87,7 @@ drop table t1; # Case 8. ALTER. Modify virtual non-stored -> virtual stored create table t1 (a int, b int as (a % 2)); alter table t1 modify b int as (a % 2) persistent; -ERROR HY000: 'Changing the STORED status' is not yet supported for computed columns +ERROR HY000: This is not yet supported for computed columns show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/vcol/t/rpl_vcol.test b/mysql-test/suite/vcol/t/rpl_vcol.test index 2ac31f5ba35..df07b3aed2d 100644 --- a/mysql-test/suite/vcol/t/rpl_vcol.test +++ b/mysql-test/suite/vcol/t/rpl_vcol.test @@ -27,7 +27,7 @@ ##### Storage engine to be tested # Set the session storage engine ---source include/have_innodb.inc +--source include/have_xtradb.inc SET @@session.storage_engine = 'InnoDB'; #------------------------------------------------------------------------------# diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test index 516e121a2aa..baefddc0fd1 100644 --- a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test @@ -32,7 +32,7 @@ ##### Storage engine to be tested # Set the session storage engine ---source include/have_innodb.inc +--source include/have_xtradb.inc eval SET @@session.storage_engine = 'InnoDB'; let $skip_full_text_checks = 1; 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..e11618163cc 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 @@ -33,7 +33,7 @@ ##### Storage engine to be tested # Set the session storage engine ---source include/have_innodb.inc +--source include/have_xtradb.inc eval SET @@session.storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs diff --git a/mysql-test/suite/vcol/t/vcol_csv.test b/mysql-test/suite/vcol/t/vcol_csv.test index b8342e24e07..75ddf819818 100644 --- a/mysql-test/suite/vcol/t/vcol_csv.test +++ b/mysql-test/suite/vcol/t/vcol_csv.test @@ -41,13 +41,7 @@ SET @@session.storage_engine = 'CSV'; # Execute the tests to be applied to all storage engines #------------------------------------------------------------------------------# -# Execute storage engine specific tests ---error ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN -create table t1 (a int, b int as (a+1)); -create table t1 (a int not null); ---error ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN -alter table t1 add column b int as (a+1); -drop table t1; +--source suite/vcol/inc/vcol_unsupported_storage_engines.inc #------------------------------------------------------------------------------# # Cleanup diff --git a/mysql-test/suite/vcol/t/vcol_handler_innodb.test b/mysql-test/suite/vcol/t/vcol_handler_innodb.test index bf443c6bbd3..1a50aeaaa86 100644 --- a/mysql-test/suite/vcol/t/vcol_handler_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_handler_innodb.test @@ -33,7 +33,7 @@ ##### Storage engine to be tested # Set the session storage engine ---source include/have_innodb.inc +--source include/have_xtradb.inc eval SET @@session.storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs 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..3b83c7f4565 100644 --- a/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test @@ -33,7 +33,7 @@ ##### Storage engine to be tested # Set the session storage engine ---source include/have_innodb.inc +--source include/have_xtradb.inc eval SET @@session.storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs diff --git a/mysql-test/suite/vcol/t/vcol_keys_innodb.test b/mysql-test/suite/vcol/t/vcol_keys_innodb.test index e408672ac07..d44d2f701cf 100644 --- a/mysql-test/suite/vcol/t/vcol_keys_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_keys_innodb.test @@ -33,7 +33,7 @@ ##### Storage engine to be tested # Set the session storage engine ---source include/have_innodb.inc +--source include/have_xtradb.inc eval SET @@session.storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs diff --git a/mysql-test/suite/vcol/t/vcol_merge.test b/mysql-test/suite/vcol/t/vcol_merge.test index 7ba72441bf5..a1d3c628c8e 100644 --- a/mysql-test/suite/vcol/t/vcol_merge.test +++ b/mysql-test/suite/vcol/t/vcol_merge.test @@ -48,7 +48,7 @@ create table t1 (a int, b int as (a % 10)); create table t2 (a int, b int as (a % 10)); insert into t1 values (1,default); insert into t2 values (2,default); ---error ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN +--error ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS create table t3 (a int, b int as (a % 10)) engine=MERGE UNION=(t1,t2); drop table t1,t2; 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..42834d5c0bb 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 @@ -35,7 +35,7 @@ ##### Storage engine to be tested # Set the session storage engine ---source include/have_innodb.inc +--source include/have_xtradb.inc eval SET @@session.storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs diff --git a/mysql-test/suite/vcol/t/vcol_partition_innodb.test b/mysql-test/suite/vcol/t/vcol_partition_innodb.test index 01230120ef9..47f1581fc96 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 +--source include/have_xtradb.inc eval SET @@session.storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs diff --git a/mysql-test/suite/vcol/t/vcol_select_innodb.test b/mysql-test/suite/vcol/t/vcol_select_innodb.test index 314aecb75b9..787f5fe77a7 100644 --- a/mysql-test/suite/vcol/t/vcol_select_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_select_innodb.test @@ -33,7 +33,7 @@ ##### Storage engine to be tested # Set the session storage engine ---source include/have_innodb.inc +--source include/have_xtradb.inc eval SET @@session.storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs diff --git a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test index 53826a460a7..32e2600c2fc 100644 --- a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test @@ -32,7 +32,7 @@ ##### Storage engine to be tested # Set the session storage engine ---source include/have_innodb.inc +--source include/have_xtradb.inc SET @@session.storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs 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..57655d6d3fe 100644 --- a/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test @@ -34,7 +34,7 @@ ##### Storage engine to be tested # Set the session storage engine ---source include/have_innodb.inc +--source include/have_xtradb.inc eval SET @@session.storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs diff --git a/mysql-test/suite/vcol/t/vcol_view_innodb.test b/mysql-test/suite/vcol/t/vcol_view_innodb.test index 01fced8e4c3..322fb122436 100644 --- a/mysql-test/suite/vcol/t/vcol_view_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_view_innodb.test @@ -33,7 +33,7 @@ ##### Storage engine to be tested # Set the session storage engine ---source include/have_innodb.inc +--source include/have_xtradb.inc eval SET @@session.storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 1489ead8b5a..0cf1713ed13 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -253,7 +253,6 @@ public: DBUG_RETURN(0); } virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share); - bool check_if_supported_virtual_columns(void) { return TRUE;} virtual bool check_if_incompatible_data(HA_CREATE_INFO *create_info, uint table_changes); private: diff --git a/sql/handler.h b/sql/handler.h index 33f935cce39..7e39ead5029 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -137,6 +137,7 @@ #define HA_BINLOG_STMT_CAPABLE (LL(1) << 35) /* Has automatic checksums and uses the new checksum format */ #define HA_HAS_NEW_CHECKSUM (LL(1) << 36) +#define HA_CAN_VIRTUAL_COLUMNS (LL(1) << 37) /* Set of all binlog flags. Currently only contain the capabilities @@ -1955,17 +1956,6 @@ public: LEX_STRING *engine_name() { return hton_name(ht); } - /* - @brief - Check whether the engine supports virtual columns - - @retval - FALSE if the engine does not support virtual columns - @retval - TRUE if the engine supports virtual columns - */ - virtual bool check_if_supported_virtual_columns(void) { return FALSE;} - protected: /* deprecated, don't use in new engines */ inline void ha_statistic_increment(ulong SSV::*offset) const { } diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 54061931d5f..a872fa1f1e9 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -6017,7 +6017,7 @@ ER_ONLY_INTEGERS_ALLOWED eng "Only integers allowed as number here" ger "An dieser Stelle sind nur Ganzzahlen zulässig" ER_UNSUPORTED_LOG_ENGINE - eng "This storage engine cannot be used for log tables"" + eng "This storage engine cannot be used for log tables" ger "Diese Speicher-Engine kann für Logtabellen nicht verwendet werden" ER_BAD_LOG_STATEMENT eng "You cannot '%s' a log table if logging is enabled" @@ -6236,13 +6236,15 @@ ER_WARNING_NON_DEFAULT_VALUE_FOR_VIRTUAL_COLUMN eng "The value specified for computed column '%s' in table '%s' ignored" ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN - eng "'%s' is not yet supported for computed columns" + eng "This is not yet supported for computed columns" ER_CONST_EXPR_IN_VCOL eng "Constant expression in computed column function is not allowed" ER_ROW_EXPR_FOR_VCOL eng "Expression for computed column cannot return a row" +ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS + eng "%s storage engine does not support computed columns" ER_UNKNOWN_OPTION eng "Unknown option '%-.64s'" ER_BAD_OPTION_VALUE diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 1d56fd53327..a9ed2a79df4 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -6280,9 +6280,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table, def->field=field; if (field->stored_in_db != def->stored_in_db) { - my_error(ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN, - MYF(0), - "Changing the STORED status"); + my_error(ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN, MYF(0)); goto err; } if (!def->after) diff --git a/sql/table.cc b/sql/table.cc index af842937491..5f448e48d80 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -2337,14 +2337,11 @@ partititon_err: /* Check virtual columns against table's storage engine. */ if (share->vfields && - ((outparam->file && - !outparam->file->check_if_supported_virtual_columns()) || - (!outparam->file && share->db_type() && - share->db_type()->db_type == DB_TYPE_CSV_DB))) // Workaround for CSV - { - my_error(ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN, - MYF(0), - "Specified storage engine"); + !(outparam->file && + (outparam->file->ha_table_flags() & HA_CAN_VIRTUAL_COLUMNS))) + { + my_error(ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS, MYF(0), + plugin_name(share->db_plugin)->str); error_reported= TRUE; goto err; } diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 256455d4531..2b6e7c1b3a6 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -821,7 +821,7 @@ int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER | HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | HA_DUPLICATE_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY | HA_FILE_BASED | HA_CAN_GEOMETRY | CANNOT_ROLLBACK_FLAG | - HA_CAN_BIT_FIELD | HA_CAN_RTREEKEYS | + HA_CAN_BIT_FIELD | HA_CAN_RTREEKEYS | HA_CAN_VIRTUAL_COLUMNS | HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT), can_enable_indexes(1), bulk_insert_single_undo(BULK_INSERT_NONE) {} diff --git a/storage/maria/ha_maria.h b/storage/maria/ha_maria.h index 251e4069d59..39307e5efdd 100644 --- a/storage/maria/ha_maria.h +++ b/storage/maria/ha_maria.h @@ -143,7 +143,6 @@ public: int assign_to_keycache(THD * thd, HA_CHECK_OPT * check_opt); int preload_keys(THD * thd, HA_CHECK_OPT * check_opt); bool check_if_incompatible_data(HA_CREATE_INFO * info, uint table_changes); - bool check_if_supported_virtual_columns(void) { return TRUE;} #ifdef HAVE_REPLICATION int dump(THD * thd, int fd); int net_read_dump(NET * net); diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index d3d073d2fbe..09a20383937 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -545,6 +545,7 @@ ha_myisam::ha_myisam(handlerton *hton, TABLE_SHARE *table_arg) :handler(hton, table_arg), file(0), int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER | HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | + HA_CAN_VIRTUAL_COLUMNS | HA_DUPLICATE_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY | HA_FILE_BASED | HA_CAN_GEOMETRY | HA_NO_TRANSACTIONS | HA_CAN_INSERT_DELAYED | HA_CAN_BIT_FIELD | HA_CAN_RTREEKEYS | diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h index 0cb89b64c3c..d8f307c4aa7 100644 --- a/storage/myisam/ha_myisam.h +++ b/storage/myisam/ha_myisam.h @@ -133,7 +133,6 @@ class ha_myisam: public handler int assign_to_keycache(THD* thd, HA_CHECK_OPT* check_opt); int preload_keys(THD* thd, HA_CHECK_OPT* check_opt); bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes); - bool check_if_supported_virtual_columns(void) { return TRUE;} #ifdef HAVE_REPLICATION int dump(THD* thd, int fd); int net_read_dump(NET* net); diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 42e9c99b95c..ee060f61c75 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -1471,7 +1471,7 @@ UNIV_INTERN ha_innobase::ha_innobase(handlerton *hton, TABLE_SHARE *table_arg) :handler(hton, table_arg), int_table_flags(HA_REC_NOT_IN_SEQ | - HA_NULL_IN_KEY | + HA_NULL_IN_KEY | HA_CAN_VIRTUAL_COLUMNS | HA_CAN_INDEX_BLOBS | HA_CAN_SQL_HANDLER | HA_PRIMARY_KEY_REQUIRED_FOR_POSITION | diff --git a/storage/xtradb/handler/ha_innodb.h b/storage/xtradb/handler/ha_innodb.h index deb72307df0..c60a5eae19e 100644 --- a/storage/xtradb/handler/ha_innodb.h +++ b/storage/xtradb/handler/ha_innodb.h @@ -222,7 +222,6 @@ class ha_innobase: public handler /** @} */ bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes); - bool check_if_supported_virtual_columns(void) { return TRUE; } }; /* Some accessor functions which the InnoDB plugin needs, but which |