Commit 66ed34d6 authored by Elena Stepanova's avatar Elena Stepanova

More comprehensive error messages and codes

parent 949cb948
...@@ -10,8 +10,10 @@ a ...@@ -10,8 +10,10 @@ a
2 2
ALTER TABLE t1 DISCARD TABLESPACE; ALTER TABLE t1 DISCARD TABLESPACE;
SELECT a FROM t1; SELECT a FROM t1;
ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine <STORAGE_ENGINE> ERROR HY000: Tablespace has been discarded for table 't1'
ALTER TABLE t1 IMPORT TABLESPACE; ALTER TABLE t1 IMPORT TABLESPACE;
Warnings:
Warning 1810 <STORAGE_ENGINE>: IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification
SELECT a FROM t1; SELECT a FROM t1;
a a
1 1
......
...@@ -62,11 +62,11 @@ EOF ...@@ -62,11 +62,11 @@ EOF
--let $alter_definition = DISCARD TABLESPACE --let $alter_definition = DISCARD TABLESPACE
--source alter_table.inc --source alter_table.inc
--let $error_codes = ER_GET_ERRNO --let $error_codes = ER_TABLESPACE_DISCARDED
--replace_result $storage_engine <STORAGE_ENGINE> --replace_result $storage_engine <STORAGE_ENGINE>
SELECT a FROM t1; SELECT a FROM t1;
--source check_errors.inc --source check_errors.inc
if ($mysql_errname != ER_GET_ERRNO) if ($mysql_errname != ER_TABLESPACE_DISCARDED)
{ {
--let $functionality = Tablespace operations --let $functionality = Tablespace operations
--source unexpected_result.inc --source unexpected_result.inc
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> ROW_FORMAT=FIXED; CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> ROW_FORMAT=FIXED;
+Warnings: +Warnings:
+Warning 140 <STORAGE_ENGINE>: assuming ROW_FORMAT=COMPACT. +Warning 1478 <STORAGE_ENGINE>: assuming ROW_FORMAT=COMPACT.
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
--- suite/storage_engine/alter_tablespace.result 2012-07-12 19:53:40.775419511 +0400 --- suite/storage_engine/alter_tablespace.result 2012-07-12 19:53:40.775419511 +0400
+++ suite/storage_engine/alter_tablespace.reject 2012-07-15 16:21:14.910435703 +0400 +++ suite/storage_engine/alter_tablespace.reject 2012-07-15 16:21:14.910435703 +0400
@@ -1,19 +1,14 @@ @@ -1,21 +1,14 @@
DROP TABLE IF EXISTS t1, t2; DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (a <INT_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; CREATE TABLE t1 (a <INT_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
ALTER TABLE t1 DISCARD TABLESPACE; ALTER TABLE t1 DISCARD TABLESPACE;
...@@ -13,8 +13,10 @@ ...@@ -13,8 +13,10 @@
-2 -2
-ALTER TABLE t1 DISCARD TABLESPACE; -ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT a FROM t1; -SELECT a FROM t1;
-ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine <STORAGE_ENGINE> -ERROR HY000: Tablespace has been discarded for table 't1'
-ALTER TABLE t1 IMPORT TABLESPACE; -ALTER TABLE t1 IMPORT TABLESPACE;
-Warnings:
-Warning 1810 <STORAGE_ENGINE>: IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification
-SELECT a FROM t1; -SELECT a FROM t1;
-a -a
-1 -1
......
...@@ -142,4 +142,4 @@ ...@@ -142,4 +142,4 @@
+# ------------------------------------------- +# -------------------------------------------
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t1; DROP TABLE t1;
+ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1'
--- alter_tablespace.result 2013-01-22 22:05:05.246633000 +0400 --- alter_tablespace.result 2013-01-22 22:05:05.246633000 +0400
+++ alter_tablespace.reject 2013-01-23 02:50:11.288110543 +0400 +++ alter_tablespace.reject 2013-01-23 02:50:11.288110543 +0400
@@ -1,19 +1,14 @@ @@ -1,21 +1,14 @@
DROP TABLE IF EXISTS t1, t2; DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (a <INT_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; CREATE TABLE t1 (a <INT_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
ALTER TABLE t1 DISCARD TABLESPACE; ALTER TABLE t1 DISCARD TABLESPACE;
...@@ -13,18 +13,20 @@ ...@@ -13,18 +13,20 @@
-2 -2
-ALTER TABLE t1 DISCARD TABLESPACE; -ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT a FROM t1; -SELECT a FROM t1;
-ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine <STORAGE_ENGINE> -ERROR HY000: Tablespace has been discarded for table 't1'
-ALTER TABLE t1 IMPORT TABLESPACE; -ALTER TABLE t1 IMPORT TABLESPACE;
-Warnings:
-Warning 1810 <STORAGE_ENGINE>: IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification
-SELECT a FROM t1; -SELECT a FROM t1;
-a -a
-1 -1
-2 -2
+ERROR HY000: 'test.t1' is not BASE TABLE +ERROR HY000: Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option
+# ERROR: Statement ended with errno 1347, errname ER_WRONG_OBJECT (expected to succeed) +# ERROR: Statement ended with errno 1031, errname ER_ILLEGAL_HA (expected to succeed)
+# ------------ UNEXPECTED RESULT ------------ +# ------------ UNEXPECTED RESULT ------------
+# [ ALTER TABLE t1 DISCARD TABLESPACE ] +# [ ALTER TABLE t1 DISCARD TABLESPACE ]
+# The statement|command finished with ER_WRONG_OBJECT. +# The statement|command finished with ER_ILLEGAL_HA.
+# Tablespace operations or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. +# Tablespace operations or the syntax or the mix could be unsupported.
+# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. +# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def.
+# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. +# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped.
+# Also, this problem may cause a chain effect (more errors of different kinds in the test). +# Also, this problem may cause a chain effect (more errors of different kinds in the test).
......
...@@ -144,4 +144,4 @@ ...@@ -144,4 +144,4 @@
+# ------------------------------------------- +# -------------------------------------------
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t1; DROP TABLE t1;
+ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1'
...@@ -33,11 +33,11 @@ ...@@ -33,11 +33,11 @@
+ERROR 42S02: Table 'test.t1' doesn't exist +ERROR 42S02: Table 'test.t1' doesn't exist
DROP TABLE t1,t2; DROP TABLE t1,t2;
-ERROR HY000: Table 't2' was not locked with LOCK TABLES -ERROR HY000: Table 't2' was not locked with LOCK TABLES
+ERROR 42S02: Unknown table 't1,t2' +ERROR 42S02: Unknown table 'test.t1,test.t2'
+# ERROR: Statement ended with errno 1051, errname ER_BAD_TABLE_ERROR (expected results: ER_TABLE_NOT_LOCKED) +# ERROR: Statement ended with errno 1051, errname ER_BAD_TABLE_ERROR (expected results: ER_TABLE_NOT_LOCKED)
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1,t2; DROP TABLE t1,t2;
+ERROR 42S02: Unknown table 't1,t2' +ERROR 42S02: Unknown table 'test.t1,test.t2'
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
CREATE TABLE t2 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; CREATE TABLE t2 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
CREATE TABLE t3 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; CREATE TABLE t3 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
+# Also, this problem may cause a chain effect (more errors of different kinds in the test). +# Also, this problem may cause a chain effect (more errors of different kinds in the test).
+# ------------------------------------------- +# -------------------------------------------
DROP TABLE t1, t2, t3; DROP TABLE t1, t2, t3;
+ERROR 42S02: Unknown table 't1,t2,t3' +ERROR 42S02: Unknown table 'test.t1,test.t2,test.t3'
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
CREATE TABLE t2 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; CREATE TABLE t2 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
LOCK TABLE t1 READ, t2 READ; LOCK TABLE t1 READ, t2 READ;
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
+test.t2 analyze Error Table 'test.t2' doesn't exist +test.t2 analyze Error Table 'test.t2' doesn't exist
+test.t2 analyze status Operation failed +test.t2 analyze status Operation failed
DROP TABLE t1, t2; DROP TABLE t1, t2;
+ERROR 42S02: Unknown table 't1,t2' +ERROR 42S02: Unknown table 'test.t1,test.t2'
CREATE TABLE t1 (a <INT_COLUMN>, <CUSTOM_INDEX>(a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2; CREATE TABLE t1 (a <INT_COLUMN>, <CUSTOM_INDEX>(a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2;
+ERROR HY000: Engine cannot be used in partitioned tables +ERROR HY000: Engine cannot be used in partitioned tables
+# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed) +# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed)
...@@ -84,4 +84,4 @@ ...@@ -84,4 +84,4 @@
+test.t1 analyze Error Table 'test.t1' doesn't exist +test.t1 analyze Error Table 'test.t1' doesn't exist
+test.t1 analyze status Operation failed +test.t1 analyze status Operation failed
DROP TABLE t1; DROP TABLE t1;
+ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1'
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
+test.t1 check Error Table 'test.t1' doesn't exist +test.t1 check Error Table 'test.t1' doesn't exist
+test.t1 check status Operation failed +test.t1 check status Operation failed
DROP TABLE t1, t2; DROP TABLE t1, t2;
+ERROR 42S02: Unknown table 't1,t2' +ERROR 42S02: Unknown table 'test.t1,test.t2'
CREATE TABLE t1 (a <INT_COLUMN>, <CUSTOM_INDEX>(a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2; CREATE TABLE t1 (a <INT_COLUMN>, <CUSTOM_INDEX>(a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2;
+ERROR HY000: Engine cannot be used in partitioned tables +ERROR HY000: Engine cannot be used in partitioned tables
+# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed) +# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed)
...@@ -173,4 +173,4 @@ ...@@ -173,4 +173,4 @@
+test.t1 check Error Table 'test.t1' doesn't exist +test.t1 check Error Table 'test.t1' doesn't exist
+test.t1 check status Operation failed +test.t1 check status Operation failed
DROP TABLE t1; DROP TABLE t1;
+ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1'
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
+Error 1146 Table 'test.t1' doesn't exist +Error 1146 Table 'test.t1' doesn't exist
+Error 1146 Table 'test.t2' doesn't exist +Error 1146 Table 'test.t2' doesn't exist
DROP TABLE t1, t2; DROP TABLE t1, t2;
+ERROR 42S02: Unknown table 't1,t2' +ERROR 42S02: Unknown table 'test.t1,test.t2'
DROP TABLE IF EXISTS t1,t2; DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> CHECKSUM=1 PARTITION BY HASH(a) PARTITIONS 2; CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> CHECKSUM=1 PARTITION BY HASH(a) PARTITIONS 2;
+ERROR HY000: Engine cannot be used in partitioned tables +ERROR HY000: Engine cannot be used in partitioned tables
...@@ -86,4 +86,4 @@ ...@@ -86,4 +86,4 @@
+Error 1146 Table 'test.t1' doesn't exist +Error 1146 Table 'test.t1' doesn't exist
+Error 1146 Table 'test.t2' doesn't exist +Error 1146 Table 'test.t2' doesn't exist
DROP TABLE t1, t2; DROP TABLE t1, t2;
+ERROR 42S02: Unknown table 't1,t2' +ERROR 42S02: Unknown table 'test.t1,test.t2'
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
+test.t2 optimize Error Table 'test.t2' doesn't exist +test.t2 optimize Error Table 'test.t2' doesn't exist
+test.t2 optimize status Operation failed +test.t2 optimize status Operation failed
DROP TABLE t1, t2; DROP TABLE t1, t2;
+ERROR 42S02: Unknown table 't1,t2' +ERROR 42S02: Unknown table 'test.t1,test.t2'
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, <CUSTOM_INDEX> (a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2; CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, <CUSTOM_INDEX> (a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2;
+ERROR HY000: Engine cannot be used in partitioned tables +ERROR HY000: Engine cannot be used in partitioned tables
+# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed) +# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed)
...@@ -92,4 +92,4 @@ ...@@ -92,4 +92,4 @@
+test.t1 optimize Error Table 'test.t1' doesn't exist +test.t1 optimize Error Table 'test.t1' doesn't exist
+test.t1 optimize status Operation failed +test.t1 optimize status Operation failed
DROP TABLE t1; DROP TABLE t1;
+ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1'
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
+test.t1 repair Error Table 'test.t1' doesn't exist +test.t1 repair Error Table 'test.t1' doesn't exist
+test.t1 repair status Operation failed +test.t1 repair status Operation failed
DROP TABLE t1, t2; DROP TABLE t1, t2;
+ERROR 42S02: Unknown table 't1,t2' +ERROR 42S02: Unknown table 'test.t1,test.t2'
call mtr.add_suppression("Got an error from thread_id=.*"); call mtr.add_suppression("Got an error from thread_id=.*");
call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*root Checking table"); call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*root Checking table");
call mtr.add_suppression(" '\..test.t1'"); call mtr.add_suppression(" '\..test.t1'");
...@@ -298,4 +298,4 @@ ...@@ -298,4 +298,4 @@
+test.t1 repair Error Table 'test.t1' doesn't exist +test.t1 repair Error Table 'test.t1' doesn't exist
+test.t1 repair status Operation failed +test.t1 repair status Operation failed
DROP TABLE t1; DROP TABLE t1;
+ERROR 42S02: Unknown table 't1' +ERROR 42S02: Unknown table 'test.t1'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment