summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorsvoj@june.mysql.com <>2007-06-07 13:53:23 +0500
committersvoj@june.mysql.com <>2007-06-07 13:53:23 +0500
commitd0a044a0bfc882dfc7921a2a8945262578ff220c (patch)
treee968dc9a6540caeb50868196c6c51bc43da534d5 /mysql-test
parent1f0aca962654797e40a836d69207d1a18fc56b63 (diff)
parentc45b4cf893b45f44006ae0edba3293666be1abe0 (diff)
downloadmariadb-git-d0a044a0bfc882dfc7921a2a8945262578ff220c.tar.gz
Merge mysql.com:/home/svoj/devel/mysql/BUG26976/mysql-5.0-engines
into mysql.com:/home/svoj/devel/mysql/BUG26976/mysql-5.1-engines
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/key_cache.result4
-rw-r--r--mysql-test/r/lock.result3
-rw-r--r--mysql-test/r/merge.result32
-rw-r--r--mysql-test/r/preload.result13
-rw-r--r--mysql-test/r/ps.result30
-rw-r--r--mysql-test/r/repair.result10
-rw-r--r--mysql-test/r/rpl_failed_optimize.result5
-rw-r--r--mysql-test/r/view.result58
-rw-r--r--mysql-test/t/merge.test21
9 files changed, 112 insertions, 64 deletions
diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result
index 1ab58c1ad6c..08d8059f61b 100644
--- a/mysql-test/r/key_cache.result
+++ b/mysql-test/r/key_cache.result
@@ -191,10 +191,8 @@ cache index t1 in unknown_key_cache;
ERROR HY000: Unknown key cache 'unknown_key_cache'
cache index t1 key (unknown_key) in keycache1;
Table Op Msg_type Msg_text
-test.t1 assign_to_keycache error Key 'unknown_key' doesn't exist in table 't1'
+test.t1 assign_to_keycache Error Key 'unknown_key' doesn't exist in table 't1'
test.t1 assign_to_keycache status Operation failed
-Warnings:
-Error 1176 Key 'unknown_key' doesn't exist in table 't1'
select @@keycache2.key_buffer_size;
@@keycache2.key_buffer_size
4194304
diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result
index 1a2099b7a94..e2000a9ec91 100644
--- a/mysql-test/r/lock.result
+++ b/mysql-test/r/lock.result
@@ -40,7 +40,8 @@ test.t1 check status OK
lock tables t1 write;
check table t2;
Table Op Msg_type Msg_text
-test.t2 check error Table 't2' was not locked with LOCK TABLES
+test.t2 check Error Table 't2' was not locked with LOCK TABLES
+test.t2 check error Corrupt
insert into t1 select index1,nr from t1;
ERROR HY000: Table 't1' was not locked with LOCK TABLES
unlock tables;
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result
index 17a3bc0877e..76667829864 100644
--- a/mysql-test/r/merge.result
+++ b/mysql-test/r/merge.result
@@ -847,4 +847,36 @@ insert into t1 values (1);
ERROR HY000: Table 't1' is read only
drop table t2;
drop table t1;
+CREATE TABLE tm1(a INT) ENGINE=MERGE UNION=(t1, t2);
+SELECT * FROM tm1;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+CHECK TABLE tm1;
+Table Op Msg_type Msg_text
+test.tm1 check Error Table './test/t1' is differently defined or of non-MyISAM type or doesn't exist
+test.tm1 check Error Table './test/t2' is differently defined or of non-MyISAM type or doesn't exist
+test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+test.tm1 check error Corrupt
+CREATE TABLE t1(a INT);
+SELECT * FROM tm1;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+CHECK TABLE tm1;
+Table Op Msg_type Msg_text
+test.tm1 check Error Table './test/t2' is differently defined or of non-MyISAM type or doesn't exist
+test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+test.tm1 check error Corrupt
+CREATE TABLE t2(a BLOB);
+SELECT * FROM tm1;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+CHECK TABLE tm1;
+Table Op Msg_type Msg_text
+test.tm1 check Error Table './test/t2' is differently defined or of non-MyISAM type or doesn't exist
+test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+test.tm1 check error Corrupt
+ALTER TABLE t2 MODIFY a INT;
+SELECT * FROM tm1;
+a
+CHECK TABLE tm1;
+Table Op Msg_type Msg_text
+test.tm1 check status OK
+DROP TABLE tm1, t1, t2;
End of 5.0 tests
diff --git a/mysql-test/r/preload.result b/mysql-test/r/preload.result
index 145fd22ffb6..24a6e594a14 100644
--- a/mysql-test/r/preload.result
+++ b/mysql-test/r/preload.result
@@ -143,10 +143,9 @@ Key_read_requests 0
Key_reads 0
load index into cache t3, t2 key (primary,b) ;
Table Op Msg_type Msg_text
-test.t3 preload_keys error Table 'test.t3' doesn't exist
+test.t3 preload_keys Error Table 'test.t3' doesn't exist
+test.t3 preload_keys error Corrupt
test.t2 preload_keys status OK
-Warnings:
-Error 1146 Table 'test.t3' doesn't exist
show status like "key_read%";
Variable_name Value
Key_read_requests 478
@@ -159,12 +158,10 @@ Key_read_requests 0
Key_reads 0
load index into cache t3 key (b), t2 key (c) ;
Table Op Msg_type Msg_text
-test.t3 preload_keys error Table 'test.t3' doesn't exist
-test.t2 preload_keys error Key 'c' doesn't exist in table 't2'
+test.t3 preload_keys Error Table 'test.t3' doesn't exist
+test.t3 preload_keys error Corrupt
+test.t2 preload_keys Error Key 'c' doesn't exist in table 't2'
test.t2 preload_keys status Operation failed
-Warnings:
-Error 1146 Table 'test.t3' doesn't exist
-Error 1176 Key 'c' doesn't exist in table 't2'
show status like "key_read%";
Variable_name Value
Key_read_requests 0
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index 76d3dbc1b72..84fcb8634d6 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -1386,45 +1386,39 @@ prepare stmt from "repair table t1, t4, t3";
execute stmt;
Table Op Msg_type Msg_text
test.t1 repair status OK
-test.t4 repair error Table 'test.t4' doesn't exist
+test.t4 repair Error Table 'test.t4' doesn't exist
+test.t4 repair error Corrupt
test.t3 repair status OK
-Warnings:
-Error 1146 Table 'test.t4' doesn't exist
execute stmt;
Table Op Msg_type Msg_text
test.t1 repair status OK
-test.t4 repair error Table 'test.t4' doesn't exist
+test.t4 repair Error Table 'test.t4' doesn't exist
+test.t4 repair error Corrupt
test.t3 repair status OK
-Warnings:
-Error 1146 Table 'test.t4' doesn't exist
prepare stmt from "optimize table t1, t3, t4";
execute stmt;
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t3 optimize status OK
-test.t4 optimize error Table 'test.t4' doesn't exist
-Warnings:
-Error 1146 Table 'test.t4' doesn't exist
+test.t4 optimize Error Table 'test.t4' doesn't exist
+test.t4 optimize error Corrupt
execute stmt;
Table Op Msg_type Msg_text
test.t1 optimize status Table is already up to date
test.t3 optimize status Table is already up to date
-test.t4 optimize error Table 'test.t4' doesn't exist
-Warnings:
-Error 1146 Table 'test.t4' doesn't exist
+test.t4 optimize Error Table 'test.t4' doesn't exist
+test.t4 optimize error Corrupt
prepare stmt from "analyze table t4, t1";
execute stmt;
Table Op Msg_type Msg_text
-test.t4 analyze error Table 'test.t4' doesn't exist
+test.t4 analyze Error Table 'test.t4' doesn't exist
+test.t4 analyze error Corrupt
test.t1 analyze status Table is already up to date
-Warnings:
-Error 1146 Table 'test.t4' doesn't exist
execute stmt;
Table Op Msg_type Msg_text
-test.t4 analyze error Table 'test.t4' doesn't exist
+test.t4 analyze Error Table 'test.t4' doesn't exist
+test.t4 analyze error Corrupt
test.t1 analyze status Table is already up to date
-Warnings:
-Error 1146 Table 'test.t4' doesn't exist
deallocate prepare stmt;
drop table t1, t2, t3;
create database mysqltest_long_database_name_to_thrash_heap;
diff --git a/mysql-test/r/repair.result b/mysql-test/r/repair.result
index 80bebe35c3b..7fc09c43f4b 100644
--- a/mysql-test/r/repair.result
+++ b/mysql-test/r/repair.result
@@ -26,16 +26,14 @@ t1 1 st_key 1 st A NULL NULL NULL YES BTREE disabled
drop table t1;
repair table t1 use_frm;
Table Op Msg_type Msg_text
-test.t1 repair error Table 'test.t1' doesn't exist
-Warnings:
-Error 1146 Table 'test.t1' doesn't exist
+test.t1 repair Error Table 'test.t1' doesn't exist
+test.t1 repair error Corrupt
create table t1 engine=myisam SELECT 1,"table 1";
flush tables;
repair table t1;
Table Op Msg_type Msg_text
-test.t1 repair error Incorrect file format 't1'
-Warnings:
-Error 130 Incorrect file format 't1'
+test.t1 repair Error Incorrect file format 't1'
+test.t1 repair error Corrupt
repair table t1 use_frm;
Table Op Msg_type Msg_text
test.t1 repair warning Number of rows changed from 0 to 1
diff --git a/mysql-test/r/rpl_failed_optimize.result b/mysql-test/r/rpl_failed_optimize.result
index ec0b3856ae7..7e397550331 100644
--- a/mysql-test/r/rpl_failed_optimize.result
+++ b/mysql-test/r/rpl_failed_optimize.result
@@ -15,9 +15,8 @@ Warnings:
Error 1205 Lock wait timeout exceeded; try restarting transaction
OPTIMIZE TABLE non_existing;
Table Op Msg_type Msg_text
-test.non_existing optimize error Table 'test.non_existing' doesn't exist
-Warnings:
-Error 1146 Table 'test.non_existing' doesn't exist
+test.non_existing optimize Error Table 'test.non_existing' doesn't exist
+test.non_existing optimize error Corrupt
select * from t1;
a
1
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 5ed06855f19..479ef7099fa 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -1378,7 +1378,9 @@ test.t1 check status OK
drop table t1;
check table v1;
Table Op Msg_type Msg_text
-test.v1 check error View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v1 check Error Table 'test.t1' doesn't exist
+test.v1 check Error View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v1 check error Corrupt
drop view v1;
create table t1 (a int);
create table t2 (a int);
@@ -1902,11 +1904,17 @@ CREATE VIEW v6 AS SELECT CONVERT_TZ(col1,'GMT','MET') FROM t2;
DROP TABLE t1;
CHECK TABLE v1, v2, v3, v4, v5, v6;
Table Op Msg_type Msg_text
-test.v1 check error View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v1 check Error Table 'test.t1' doesn't exist
+test.v1 check Error View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v1 check error Corrupt
test.v2 check status OK
-test.v3 check error View 'test.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v3 check Error Table 'test.t1' doesn't exist
+test.v3 check Error View 'test.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v3 check error Corrupt
test.v4 check status OK
-test.v5 check error View 'test.v5' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v5 check Error Table 'test.t1' doesn't exist
+test.v5 check Error View 'test.v5' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v5 check error Corrupt
test.v6 check status OK
drop view v1, v2, v3, v4, v5, v6;
drop table t2;
@@ -1926,11 +1934,17 @@ CREATE VIEW v6 AS SELECT f2() FROM t3;
drop function f1;
CHECK TABLE v1, v2, v3, v4, v5, v6;
Table Op Msg_type Msg_text
-test.v1 check error View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v1 check Error FUNCTION test.f1 does not exist
+test.v1 check Error View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v1 check error Corrupt
test.v2 check status OK
-test.v3 check error View 'test.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v3 check Error FUNCTION test.f1 does not exist
+test.v3 check Error View 'test.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v3 check error Corrupt
test.v4 check status OK
-test.v5 check error View 'test.v5' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v5 check Error FUNCTION test.f1 does not exist
+test.v5 check Error View 'test.v5' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+test.v5 check error Corrupt
test.v6 check status OK
create function f1 () returns int return (select max(col1) from t1);
DROP TABLE t1;
@@ -2366,35 +2380,29 @@ CREATE TABLE t1(id INT);
CREATE VIEW v1 AS SELECT id FROM t1;
OPTIMIZE TABLE v1;
Table Op Msg_type Msg_text
-test.v1 optimize error 'test.v1' is not BASE TABLE
-Warnings:
-Error 1347 'test.v1' is not BASE TABLE
+test.v1 optimize Error 'test.v1' is not BASE TABLE
+test.v1 optimize error Corrupt
ANALYZE TABLE v1;
Table Op Msg_type Msg_text
-test.v1 analyze error 'test.v1' is not BASE TABLE
-Warnings:
-Error 1347 'test.v1' is not BASE TABLE
+test.v1 analyze Error 'test.v1' is not BASE TABLE
+test.v1 analyze error Corrupt
REPAIR TABLE v1;
Table Op Msg_type Msg_text
-test.v1 repair error 'test.v1' is not BASE TABLE
-Warnings:
-Error 1347 'test.v1' is not BASE TABLE
+test.v1 repair Error 'test.v1' is not BASE TABLE
+test.v1 repair error Corrupt
DROP TABLE t1;
OPTIMIZE TABLE v1;
Table Op Msg_type Msg_text
-test.v1 optimize error 'test.v1' is not BASE TABLE
-Warnings:
-Error 1347 'test.v1' is not BASE TABLE
+test.v1 optimize Error 'test.v1' is not BASE TABLE
+test.v1 optimize error Corrupt
ANALYZE TABLE v1;
Table Op Msg_type Msg_text
-test.v1 analyze error 'test.v1' is not BASE TABLE
-Warnings:
-Error 1347 'test.v1' is not BASE TABLE
+test.v1 analyze Error 'test.v1' is not BASE TABLE
+test.v1 analyze error Corrupt
REPAIR TABLE v1;
Table Op Msg_type Msg_text
-test.v1 repair error 'test.v1' is not BASE TABLE
-Warnings:
-Error 1347 'test.v1' is not BASE TABLE
+test.v1 repair Error 'test.v1' is not BASE TABLE
+test.v1 repair error Corrupt
DROP VIEW v1;
create definer = current_user() sql security invoker view v1 as select 1;
show create view v1;
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index 69e0b19ebf0..43638c55271 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -490,4 +490,25 @@ insert into t1 values (1);
drop table t2;
drop table t1;
+#
+# BUG#26976 - Missing table in merge not noted in related error msg + SHOW
+# CREATE TABLE fails
+#
+CREATE TABLE tm1(a INT) ENGINE=MERGE UNION=(t1, t2);
+--error 1168
+SELECT * FROM tm1;
+CHECK TABLE tm1;
+CREATE TABLE t1(a INT);
+--error 1168
+SELECT * FROM tm1;
+CHECK TABLE tm1;
+CREATE TABLE t2(a BLOB);
+--error 1168
+SELECT * FROM tm1;
+CHECK TABLE tm1;
+ALTER TABLE t2 MODIFY a INT;
+SELECT * FROM tm1;
+CHECK TABLE tm1;
+DROP TABLE tm1, t1, t2;
+
--echo End of 5.0 tests