From cdecd86a53f4935e31ffab2271babfcf7754da3b Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Thu, 7 Nov 2013 03:36:53 +0400 Subject: [PATCH] More verbose error messages --- .../suite/storage_engine/alter_tablespace.result | 2 +- mysql-test/suite/storage_engine/alter_tablespace.test | 1 + mysql-test/suite/storage_engine/obfuscate.inc | 2 +- .../mysql-test/storage_engine/alter_tablespace.rdiff | 11 ----------- .../mysql-test/storage_engine/fulltext_search.rdiff | 4 ++-- .../storage_engine/index_enable_disable.rdiff | 6 +++--- .../storage_engine/type_spatial_indexes.rdiff | 2 +- storage/innobase/mysql-test/storage_engine/vcol.rdiff | 2 +- .../mysql-test/storage_engine/alter_tablespace.rdiff | 4 ++-- .../mysql-test/storage_engine/alter_tablespace.rdiff | 2 +- .../mysql-test/storage_engine/fulltext_search.rdiff | 4 ++-- .../myisammrg/mysql-test/storage_engine/handler.rdiff | 4 ++-- .../storage_engine/index_enable_disable.rdiff | 6 +++--- .../mysql-test/storage_engine/truncate_table.rdiff | 2 +- .../myisammrg/mysql-test/storage_engine/vcol.rdiff | 2 +- 15 files changed, 22 insertions(+), 32 deletions(-) delete mode 100644 storage/innobase/mysql-test/storage_engine/alter_tablespace.rdiff diff --git a/mysql-test/suite/storage_engine/alter_tablespace.result b/mysql-test/suite/storage_engine/alter_tablespace.result index 71ef910b222..5bbfe00e94b 100644 --- a/mysql-test/suite/storage_engine/alter_tablespace.result +++ b/mysql-test/suite/storage_engine/alter_tablespace.result @@ -10,7 +10,7 @@ a 2 ALTER TABLE t1 DISCARD TABLESPACE; SELECT a FROM t1; -ERROR HY000: Got error -1 from storage engine +ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine ALTER TABLE t1 IMPORT TABLESPACE; SELECT a FROM t1; a diff --git a/mysql-test/suite/storage_engine/alter_tablespace.test b/mysql-test/suite/storage_engine/alter_tablespace.test index ac206b8e328..9ac7f400e28 100644 --- a/mysql-test/suite/storage_engine/alter_tablespace.test +++ b/mysql-test/suite/storage_engine/alter_tablespace.test @@ -63,6 +63,7 @@ EOF --source alter_table.inc --let $error_codes = ER_GET_ERRNO + --replace_result $storage_engine SELECT a FROM t1; --source check_errors.inc if ($mysql_errname != ER_GET_ERRNO) diff --git a/mysql-test/suite/storage_engine/obfuscate.inc b/mysql-test/suite/storage_engine/obfuscate.inc index 96c9e5a2956..e1a8a5bede0 100644 --- a/mysql-test/suite/storage_engine/obfuscate.inc +++ b/mysql-test/suite/storage_engine/obfuscate.inc @@ -1,4 +1,4 @@ let $storage_engine_search_string = ENGINE=$storage_engine; ---replace_result ' ' ' ' ' ,' ',' ' )' ')' '( ' '(' $default_tbl_opts $int_indexed_col $char_indexed_col $int_col $char_col $default_col_indexed_opts $default_col_opts $storage_engine_search_string ENGINE= $default_index +--replace_result ' ' ' ' ' ,' ',' ' )' ')' '( ' '(' $default_tbl_opts $int_indexed_col $char_indexed_col $int_col $char_col $default_col_indexed_opts $default_col_opts $storage_engine_search_string ENGINE= $storage_engine $default_index diff --git a/storage/innobase/mysql-test/storage_engine/alter_tablespace.rdiff b/storage/innobase/mysql-test/storage_engine/alter_tablespace.rdiff deleted file mode 100644 index 0cbe1fa48ae..00000000000 --- a/storage/innobase/mysql-test/storage_engine/alter_tablespace.rdiff +++ /dev/null @@ -1,11 +0,0 @@ ---- suite/storage_engine/alter_tablespace.result 2013-01-13 01:03:49.133994000 +0400 -+++ suite/storage_engine/alter_tablespace.reject 2013-01-13 01:04:04.398937286 +0400 -@@ -10,7 +10,7 @@ - 2 - ALTER TABLE t1 DISCARD TABLESPACE; - SELECT * FROM t1; --ERROR HY000: Got error -1 from storage engine -+ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine - ALTER TABLE t1 IMPORT TABLESPACE; - SELECT * FROM t1; - a diff --git a/storage/innobase/mysql-test/storage_engine/fulltext_search.rdiff b/storage/innobase/mysql-test/storage_engine/fulltext_search.rdiff index f668e44109c..21bcf1a611d 100644 --- a/storage/innobase/mysql-test/storage_engine/fulltext_search.rdiff +++ b/storage/innobase/mysql-test/storage_engine/fulltext_search.rdiff @@ -62,7 +62,7 @@ -v0 rating -text1 178.11756896972656 -DROP TABLE t1; -+ERROR HY000: The used table type doesn't support FULLTEXT indexes ++ERROR HY000: The storage engine doesn't support FULLTEXT indexes +# ERROR: Statement ended with errno 1214, errname ER_TABLE_CANT_HANDLE_FT (expected to succeed) +# ------------ UNEXPECTED RESULT ------------ +# The statement|command finished with ER_TABLE_CANT_HANDLE_FT. @@ -139,7 +139,7 @@ -text1 190.56150817871094 -text4 1.1758291721343994 -DROP TABLE t1; -+ERROR HY000: The used table type doesn't support FULLTEXT indexes ++ERROR HY000: The storage engine doesn't support FULLTEXT indexes +# ERROR: Statement ended with errno 1214, errname ER_TABLE_CANT_HANDLE_FT (expected to succeed) +# ------------ UNEXPECTED RESULT ------------ +# The statement|command finished with ER_TABLE_CANT_HANDLE_FT. diff --git a/storage/innobase/mysql-test/storage_engine/index_enable_disable.rdiff b/storage/innobase/mysql-test/storage_engine/index_enable_disable.rdiff index 23aa66d2568..f8e812e7edb 100644 --- a/storage/innobase/mysql-test/storage_engine/index_enable_disable.rdiff +++ b/storage/innobase/mysql-test/storage_engine/index_enable_disable.rdiff @@ -5,7 +5,7 @@ t1 1 a 1 a # # NULL NULL YES BTREE ALTER TABLE t1 DISABLE KEYS; +Warnings: -+Note 1031 Table storage engine for 't1' doesn't have this option ++Note 1031 Storage engine of the table `test`.`t1` doesn't have this option SHOW INDEX IN t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 1 a 1 a # # NULL NULL YES BTREE disabled @@ -18,7 +18,7 @@ (11),(12),(13),(14),(15),(16),(17),(18),(19),(20); ALTER TABLE t1 ENABLE KEYS; +Warnings: -+Note 1031 Table storage engine for 't1' doesn't have this option ++Note 1031 Storage engine of the table `test`.`t1` doesn't have this option SHOW INDEX IN t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment t1 1 a 1 a # # NULL NULL YES BTREE @@ -27,7 +27,7 @@ (21),(22),(23),(24),(25),(26),(27),(28),(29); ALTER TABLE t1 DISABLE KEYS; +Warnings: -+Note 1031 Table storage engine for 't1' doesn't have this option ++Note 1031 Storage engine of the table `test`.`t1` doesn't have this option INSERT INTO t1 (a) VALUES (29); ERROR 23000: Duplicate entry '29' for key 'a' # Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). diff --git a/storage/innobase/mysql-test/storage_engine/type_spatial_indexes.rdiff b/storage/innobase/mysql-test/storage_engine/type_spatial_indexes.rdiff index 04572ee03be..d3fb59e6ce3 100644 --- a/storage/innobase/mysql-test/storage_engine/type_spatial_indexes.rdiff +++ b/storage/innobase/mysql-test/storage_engine/type_spatial_indexes.rdiff @@ -698,7 +698,7 @@ -WHERE ST_Contains(ST_Buffer(bridges.position, 15.0), buildings.footprint) = 1; -count(*) -1 -+ERROR HY000: The used table type doesn't support SPATIAL indexes ++ERROR HY000: The storage engine doesn't support SPATIAL indexes +# ERROR: Statement ended with errno 1464, errname ER_TABLE_CANT_HANDLE_SPKEYS (expected to succeed) +# ------------ UNEXPECTED RESULT ------------ +# [ CREATE TABLE gis_point (fid INT(11) /*!*/ /*Custom column options*/, g POINT NOT NULL, SPATIAL INDEX(g)) ENGINE=InnoDB /*!*/ /*Custom table options*/ ] diff --git a/storage/innobase/mysql-test/storage_engine/vcol.rdiff b/storage/innobase/mysql-test/storage_engine/vcol.rdiff index 23b26a52228..46cee5f836b 100644 --- a/storage/innobase/mysql-test/storage_engine/vcol.rdiff +++ b/storage/innobase/mysql-test/storage_engine/vcol.rdiff @@ -70,7 +70,7 @@ -3 4 -4 5 -DROP TABLE t1; -+ERROR HY000: InnoDB storage engine does not support computed columns ++ERROR HY000: storage engine does not support computed columns +# ERROR: Statement ended with errno 1910, errname ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS (expected to succeed) +# ------------ UNEXPECTED RESULT ------------ +# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom column options*/, b INT(11) /*!*/ /*Custom column options*/ GENERATED ALWAYS AS (a+1)) ENGINE=InnoDB /*!*/ /*Custom table options*/ ] diff --git a/storage/myisam/mysql-test/storage_engine/alter_tablespace.rdiff b/storage/myisam/mysql-test/storage_engine/alter_tablespace.rdiff index 07c03fc8d3e..bbbe6826494 100644 --- a/storage/myisam/mysql-test/storage_engine/alter_tablespace.rdiff +++ b/storage/myisam/mysql-test/storage_engine/alter_tablespace.rdiff @@ -13,13 +13,13 @@ -2 -ALTER TABLE t1 DISCARD TABLESPACE; -SELECT a FROM t1; --ERROR HY000: Got error -1 from storage engine +-ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine -ALTER TABLE t1 IMPORT TABLESPACE; -SELECT a FROM t1; -a -1 -2 -+ERROR HY000: Table storage engine for 't1' doesn't have this option ++ERROR HY000: Storage engine of the table `test`.`t1` doesn't have this option +# ERROR: Statement ended with errno 1031, errname ER_ILLEGAL_HA (expected to succeed) +# ------------ UNEXPECTED RESULT ------------ +# [ ALTER TABLE t1 DISCARD TABLESPACE ] diff --git a/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff b/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff index 1091d6250b9..d66c6015596 100644 --- a/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff +++ b/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff @@ -13,7 +13,7 @@ -2 -ALTER TABLE t1 DISCARD TABLESPACE; -SELECT a FROM t1; --ERROR HY000: Got error -1 from storage engine +-ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine -ALTER TABLE t1 IMPORT TABLESPACE; -SELECT a FROM t1; -a diff --git a/storage/myisammrg/mysql-test/storage_engine/fulltext_search.rdiff b/storage/myisammrg/mysql-test/storage_engine/fulltext_search.rdiff index 7234cdfd2fa..c96b697167c 100644 --- a/storage/myisammrg/mysql-test/storage_engine/fulltext_search.rdiff +++ b/storage/myisammrg/mysql-test/storage_engine/fulltext_search.rdiff @@ -62,7 +62,7 @@ -v0 rating -text1 178.11756896972656 -DROP TABLE t1; -+ERROR HY000: The used table type doesn't support FULLTEXT indexes ++ERROR HY000: The storage engine MRG_MyISAM doesn't support FULLTEXT indexes +# ERROR: Statement ended with errno 1214, errname ER_TABLE_CANT_HANDLE_FT (expected to succeed) +# ------------ UNEXPECTED RESULT ------------ +# The statement|command finished with ER_TABLE_CANT_HANDLE_FT. @@ -139,7 +139,7 @@ -text1 190.56150817871094 -text4 1.1758291721343994 -DROP TABLE t1; -+ERROR HY000: The used table type doesn't support FULLTEXT indexes ++ERROR HY000: The storage engine MRG_MyISAM doesn't support FULLTEXT indexes +# ERROR: Statement ended with errno 1214, errname ER_TABLE_CANT_HANDLE_FT (expected to succeed) +# ------------ UNEXPECTED RESULT ------------ +# The statement|command finished with ER_TABLE_CANT_HANDLE_FT. diff --git a/storage/myisammrg/mysql-test/storage_engine/handler.rdiff b/storage/myisammrg/mysql-test/storage_engine/handler.rdiff index c56cfae0e3a..9e9117e04fc 100644 --- a/storage/myisammrg/mysql-test/storage_engine/handler.rdiff +++ b/storage/myisammrg/mysql-test/storage_engine/handler.rdiff @@ -47,7 +47,7 @@ -foobar 1000 -HANDLER t1 CLOSE; -ERROR 42S02: Unknown table 't1' in HANDLER -+ERROR HY000: Table storage engine for 'h1' doesn't have this option ++ERROR HY000: Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option +# ------------ UNEXPECTED RESULT ------------ +# The statement|command finished with ER_ILLEGAL_HA. +# Functionality or the syntax or the mix could be unsupported. @@ -84,5 +84,5 @@ -a b -200 b -HANDLER h1 CLOSE; -+ERROR HY000: Table storage engine for 'h1' doesn't have this option ++ERROR HY000: Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option DROP TABLE t1; diff --git a/storage/myisammrg/mysql-test/storage_engine/index_enable_disable.rdiff b/storage/myisammrg/mysql-test/storage_engine/index_enable_disable.rdiff index 7b89e177ffb..357d4e931d2 100644 --- a/storage/myisammrg/mysql-test/storage_engine/index_enable_disable.rdiff +++ b/storage/myisammrg/mysql-test/storage_engine/index_enable_disable.rdiff @@ -5,7 +5,7 @@ t1 1 a 1 a # # NULL NULL YES BTREE ALTER TABLE t1 DISABLE KEYS; +Warnings: -+Note 1031 Table storage engine for 't1' doesn't have this option ++Note 1031 Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option SHOW INDEX IN t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 1 a 1 a # # NULL NULL YES BTREE disabled @@ -18,7 +18,7 @@ (11),(12),(13),(14),(15),(16),(17),(18),(19),(20); ALTER TABLE t1 ENABLE KEYS; +Warnings: -+Note 1031 Table storage engine for 't1' doesn't have this option ++Note 1031 Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option SHOW INDEX IN t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment t1 1 a 1 a # # NULL NULL YES BTREE @@ -27,7 +27,7 @@ (21),(22),(23),(24),(25),(26),(27),(28),(29); ALTER TABLE t1 DISABLE KEYS; +Warnings: -+Note 1031 Table storage engine for 't1' doesn't have this option ++Note 1031 Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option INSERT INTO t1 (a) VALUES (29); ERROR 23000: Duplicate entry '29' for key 'a' # Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). diff --git a/storage/myisammrg/mysql-test/storage_engine/truncate_table.rdiff b/storage/myisammrg/mysql-test/storage_engine/truncate_table.rdiff index e4de81bae70..bb2e5585910 100644 --- a/storage/myisammrg/mysql-test/storage_engine/truncate_table.rdiff +++ b/storage/myisammrg/mysql-test/storage_engine/truncate_table.rdiff @@ -37,7 +37,7 @@ -HANDLER t1 OPEN AS h2; -HANDLER h2 READ FIRST; -a b -+ERROR HY000: Table storage engine for 'h1' doesn't have this option ++ERROR HY000: Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option +# ------------ UNEXPECTED RESULT ------------ +# The statement|command finished with ER_ILLEGAL_HA. +# HANDLER or the syntax or the mix could be unsupported. diff --git a/storage/myisammrg/mysql-test/storage_engine/vcol.rdiff b/storage/myisammrg/mysql-test/storage_engine/vcol.rdiff index 8b2710be221..c7372326fad 100644 --- a/storage/myisammrg/mysql-test/storage_engine/vcol.rdiff +++ b/storage/myisammrg/mysql-test/storage_engine/vcol.rdiff @@ -70,7 +70,7 @@ -3 4 -4 5 -DROP TABLE t1; -+ERROR HY000: MRG_MYISAM storage engine does not support computed columns ++ERROR HY000: MRG_MyISAM storage engine does not support computed columns +# ERROR: Statement ended with errno 1910, errname ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS (expected to succeed) +# ------------ UNEXPECTED RESULT ------------ +# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom column options*/, b INT(11) /*!*/ /*Custom column options*/ GENERATED ALWAYS AS (a+1)) ENGINE=MRG_MYISAM /*!*/ /*Custom table options*/ UNION(mrg.t1) INSERT_METHOD=LAST ]