List:Commits« Previous MessageNext Message »
From:Staale Smedseng Date:February 27 2009 3:53pm
Subject:bzr commit into mysql-6.0-bugteam branch (staale.smedseng:3094) Bug#29458
View as plain text  
#At file:///Users/staale/z/b29458-60p/ based on revid:ingo.struewing@stripped

 3094 Staale Smedseng	2009-02-27 [merge]
      Commit before push of Bug#29458 to 6.0-bugteam

    modified:
      mysql-test/r/mysqlcheck.result
      mysql-test/r/preload.result
      mysql-test/r/ps.result
      mysql-test/r/repair.result
      mysql-test/suite/funcs_1/r/falcon_views.result
      mysql-test/suite/funcs_1/r/innodb_views.result
      mysql-test/suite/funcs_1/r/memory_views.result
      mysql-test/suite/funcs_1/r/ndb_views.result
      mysql-test/suite/maria/r/maria-preload.result
      mysql-test/suite/rpl/r/rpl_failed_optimize.result
      sql/sql_table.cc
=== modified file 'mysql-test/r/mysqlcheck.result'
--- a/mysql-test/r/mysqlcheck.result	2009-02-16 14:47:53 +0000
+++ b/mysql-test/r/mysqlcheck.result	2009-02-27 15:52:30 +0000
@@ -157,7 +157,7 @@ SET NAMES DEFAULT;
 mysqlcheck --default-character-set="latin1" --databases test
 test.?
 Error    : Table doesn't exist
-error    : Corrupt
+status   : Operation failed
 mysqlcheck --default-character-set="utf8" --databases test
 test.��                                            OK
 SET NAMES utf8;

=== modified file 'mysql-test/r/preload.result'
--- a/mysql-test/r/preload.result	2007-06-07 08:53:23 +0000
+++ b/mysql-test/r/preload.result	2009-02-27 15:06:23 +0000
@@ -144,7 +144,7 @@ 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	Corrupt
+test.t3	preload_keys	status	Operation failed
 test.t2	preload_keys	status	OK
 show status like "key_read%";
 Variable_name	Value
@@ -159,7 +159,7 @@ 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.t3	preload_keys	error	Corrupt
+test.t3	preload_keys	status	Operation failed
 test.t2	preload_keys	Error	Key 'c' doesn't exist in table 't2'
 test.t2	preload_keys	status	Operation failed
 show status like "key_read%";

=== modified file 'mysql-test/r/ps.result'
--- a/mysql-test/r/ps.result	2009-02-25 12:27:38 +0000
+++ b/mysql-test/r/ps.result	2009-02-27 15:52:30 +0000
@@ -1394,13 +1394,13 @@ 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	Corrupt
+test.t4	repair	status	Operation failed
 test.t3	repair	status	OK
 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	Corrupt
+test.t4	repair	status	Operation failed
 test.t3	repair	status	OK
 prepare stmt from "optimize table t1, t3, t4";
 execute stmt;
@@ -1408,23 +1408,23 @@ 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
-test.t4	optimize	error	Corrupt
+test.t4	optimize	status	Operation failed
 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
-test.t4	optimize	error	Corrupt
+test.t4	optimize	status	Operation failed
 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	Corrupt
+test.t4	analyze	status	Operation failed
 test.t1	analyze	status	Table is already up to date
 execute stmt;
 Table	Op	Msg_type	Msg_text
 test.t4	analyze	Error	Table 'test.t4' doesn't exist
-test.t4	analyze	error	Corrupt
+test.t4	analyze	status	Operation failed
 test.t1	analyze	status	Table is already up to date
 deallocate prepare stmt;
 drop table t1, t2, t3;

=== modified file 'mysql-test/r/repair.result'
--- a/mysql-test/r/repair.result	2008-08-12 18:56:42 +0000
+++ b/mysql-test/r/repair.result	2009-02-27 15:52:30 +0000
@@ -27,7 +27,7 @@ drop table t1;
 repair table t1 use_frm;
 Table	Op	Msg_type	Msg_text
 test.t1	repair	Error	Table 'test.t1' doesn't exist
-test.t1	repair	error	Corrupt
+test.t1	repair	status	Operation failed
 create table t1 engine=myisam SELECT 1,"table 1";
 flush tables;
 repair table t1;

=== modified file 'mysql-test/suite/funcs_1/r/falcon_views.result'
--- a/mysql-test/suite/funcs_1/r/falcon_views.result	2009-02-02 12:46:34 +0000
+++ b/mysql-test/suite/funcs_1/r/falcon_views.result	2009-02-27 15:52:30 +0000
@@ -21367,7 +21367,7 @@ ERROR 42S02: Table 'test.v1' doesn't exi
 CHECK TABLE v1;
 Table	Op	Msg_type	Msg_text
 test.v1	check	Error	Table 'test.v1' doesn't exist
-test.v1	check	error	Corrupt
+test.v1	check	status	Operation failed
 DESCRIBE v1;
 ERROR 42S02: Table 'test.v1' doesn't exist
 EXPLAIN SELECT * FROM v1;

=== modified file 'mysql-test/suite/funcs_1/r/innodb_views.result'
--- a/mysql-test/suite/funcs_1/r/innodb_views.result	2009-02-02 15:58:48 +0000
+++ b/mysql-test/suite/funcs_1/r/innodb_views.result	2009-02-27 15:52:30 +0000
@@ -21367,7 +21367,7 @@ ERROR 42S02: Table 'test.v1' doesn't exi
 CHECK TABLE v1;
 Table	Op	Msg_type	Msg_text
 test.v1	check	Error	Table 'test.v1' doesn't exist
-test.v1	check	error	Corrupt
+test.v1	check	status	Operation failed
 DESCRIBE v1;
 ERROR 42S02: Table 'test.v1' doesn't exist
 EXPLAIN SELECT * FROM v1;

=== modified file 'mysql-test/suite/funcs_1/r/memory_views.result'
--- a/mysql-test/suite/funcs_1/r/memory_views.result	2009-02-14 16:10:30 +0000
+++ b/mysql-test/suite/funcs_1/r/memory_views.result	2009-02-27 15:52:30 +0000
@@ -21369,7 +21369,7 @@ ERROR 42S02: Table 'test.v1' doesn't exi
 CHECK TABLE v1;
 Table	Op	Msg_type	Msg_text
 test.v1	check	Error	Table 'test.v1' doesn't exist
-test.v1	check	error	Corrupt
+test.v1	check	status	Operation failed
 DESCRIBE v1;
 ERROR 42S02: Table 'test.v1' doesn't exist
 EXPLAIN SELECT * FROM v1;

=== modified file 'mysql-test/suite/funcs_1/r/ndb_views.result'
--- a/mysql-test/suite/funcs_1/r/ndb_views.result	2009-02-16 10:30:55 +0000
+++ b/mysql-test/suite/funcs_1/r/ndb_views.result	2009-02-27 15:52:30 +0000
@@ -21367,7 +21367,7 @@ ERROR 42S02: Table 'test.v1' doesn't exi
 CHECK TABLE v1;
 Table	Op	Msg_type	Msg_text
 test.v1	check	Error	Table 'test.v1' doesn't exist
-test.v1	check	error	Corrupt
+test.v1	check	status	Operation failed
 DESCRIBE v1;
 ERROR 42S02: Table 'test.v1' doesn't exist
 EXPLAIN SELECT * FROM v1;

=== modified file 'mysql-test/suite/maria/r/maria-preload.result'
--- a/mysql-test/suite/maria/r/maria-preload.result	2008-12-10 17:04:38 +0000
+++ b/mysql-test/suite/maria/r/maria-preload.result	2009-02-27 15:52:30 +0000
@@ -136,7 +136,7 @@ MARIA_PAGECACHE_READS	274
 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	Corrupt
+test.t3	preload_keys	status	Operation failed
 test.t2	preload_keys	status	OK
 select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
@@ -149,7 +149,7 @@ MARIA_PAGECACHE_READS	317
 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.t3	preload_keys	error	Corrupt
+test.t3	preload_keys	status	Operation failed
 test.t2	preload_keys	Error	Key 'c' doesn't exist in table 't2'
 test.t2	preload_keys	status	Operation failed
 select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;

=== modified file 'mysql-test/suite/rpl/r/rpl_failed_optimize.result'
--- a/mysql-test/suite/rpl/r/rpl_failed_optimize.result	2008-08-11 18:02:03 +0000
+++ b/mysql-test/suite/rpl/r/rpl_failed_optimize.result	2009-02-27 15:06:23 +0000
@@ -17,7 +17,7 @@ Error	1205	Lock wait timeout exceeded; t
 OPTIMIZE TABLE non_existing;
 Table	Op	Msg_type	Msg_text
 test.non_existing	optimize	Error	Table 'test.non_existing' doesn't exist
-test.non_existing	optimize	error	Corrupt
+test.non_existing	optimize	status	Operation failed
 select * from t1;
 a
 1

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2009-02-20 12:37:37 +0000
+++ b/sql/sql_table.cc	2009-02-27 15:52:30 +0000
@@ -4364,7 +4364,13 @@ static bool mysql_admin_table(THD* thd, 
           view_checksum(thd, table) == HA_ADMIN_WRONG_CHECKSUM)
         push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                      ER_VIEW_CHECKSUM, ER(ER_VIEW_CHECKSUM));
-      result_code= HA_ADMIN_CORRUPT;
+      if (thd->stmt_da->is_error() && 
+          thd->stmt_da->sql_errno() == ER_NO_SUCH_TABLE)
+        /* A missing table is just issued as a failed command */
+        result_code= HA_ADMIN_FAILED;
+      else
+        /* Default failure code is corrupt table */
+        result_code= HA_ADMIN_CORRUPT;
       goto send_result;
     }
 

Attachment: [text/bzr-bundle] bzr/staale.smedseng@sun.com-20090227155230-80h6236kx06qvrbn.bundle
Thread
bzr commit into mysql-6.0-bugteam branch (staale.smedseng:3094) Bug#29458Staale Smedseng27 Feb