List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:September 17 2009 11:39am
Subject:bzr push into mysql-5.1-bugteam branch (Sergey.Glukhov:3110 to 3111)
Bug#42364
View as plain text  
 3111 Sergey Glukhov	2009-09-17
      Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table
      additional backport of of bug43138 fix
     @ mysql-test/t/myisam-system.test
        additional backport of of bug43138 fix
     @ sql/sql_db.cc
        additional backport of of bug43138 fix

    modified:
      mysql-test/r/trigger_notembedded.result
      mysql-test/t/myisam-system.test
      sql/sql_db.cc
 3110 Satya B	2009-09-17
      Applying InnoDB snapshot 5.1-ss5282, Fixes BUG#44030
      
      1. Fixes BUG#44030 - Error: (1500) Couldn't read the MAX(ID) autoinc value 
                           from the index (PRIMARY)
      
      2. Disables the innodb-autoinc test for innodb plugin temporarily.
         The testcase for this bug has different result file for InnoDB plugin.
         Should add the testcase to Innodb suite with a different result file.
      
      Detailed revision comments:
      
      r5243 | sunny | 2009-06-04 03:17:14 +0300 (Thu, 04 Jun 2009) | 14 lines
      branches/5.1: When the InnoDB and MySQL data dictionaries go out of sync, before
      the bug fix we would assert on missing autoinc columns. With this fix we allow
      MySQL to open the table but set the next autoinc value for the column to the
      MAX value. This effectively disables the next value generation. INSERTs will
      fail with a generic AUTOINC failure. However, the user should be able to
      read/dump the table, set the column values explicitly, use ALTER TABLE to
      set the next autoinc value and/or sync the two data dictionaries to resume
      normal operations.
      
      Fix Bug#44030 Error: (1500) Couldn't read the MAX(ID) autoinc value from the
      index (PRIMARY)
      
      rb://118
      
      r5252 | sunny | 2009-06-04 10:16:24 +0300 (Thu, 04 Jun 2009) | 2 lines
      branches/5.1: The version of the result file checked in was broken in r5243.
      
      r5259 | vasil | 2009-06-05 10:29:16 +0300 (Fri, 05 Jun 2009) | 7 lines
      branches/5.1:
      
      Remove the word "Error" from the printout because the mysqltest suite
      interprets it as an error and thus the innodb-autoinc test fails.
      
      Approved by:	Sunny (via IM)
      r5466 | vasil | 2009-07-02 10:46:45 +0300 (Thu, 02 Jul 2009) | 6 lines
      branches/5.1:
      
      Adjust the failing innodb-autoinc test to conform to the latest behavior
      of the MySQL code. The idea and the comment in innodb-autoinc.test come
      from Sunny.

    modified:
      mysql-test/lib/mtr_cases.pm
      mysql-test/r/innodb-autoinc.result
      mysql-test/t/innodb-autoinc.test
      storage/innobase/handler/ha_innodb.cc
=== modified file 'mysql-test/r/trigger_notembedded.result'
--- a/mysql-test/r/trigger_notembedded.result	2009-06-25 10:52:50 +0000
+++ b/mysql-test/r/trigger_notembedded.result	2009-09-17 11:33:23 +0000
@@ -180,8 +180,6 @@ NULL	mysqltest_db1	trg5	DELETE	NULL	mysq
 DROP USER mysqltest_dfn@localhost;
 DROP USER mysqltest_inv@localhost;
 DROP DATABASE mysqltest_db1;
-Warnings:
-Warning	1454	No definer attribute for trigger 'mysqltest_db1'.'trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger.
 DELETE FROM mysql.user WHERE User LIKE 'mysqltest_%';
 DELETE FROM mysql.db WHERE User LIKE 'mysqltest_%';
 DELETE FROM mysql.tables_priv WHERE User LIKE 'mysqltest_%';

=== modified file 'mysql-test/t/myisam-system.test'
--- a/mysql-test/t/myisam-system.test	2007-12-12 17:19:24 +0000
+++ b/mysql-test/t/myisam-system.test	2009-09-17 11:33:23 +0000
@@ -12,11 +12,11 @@ let $MYSQLD_DATADIR= `select @@datadir`;
 drop table if exists t1;
 create table t1 (a int) engine=myisam;
 --remove_file $MYSQLD_DATADIR/test/t1.MYI
---error 1051,6
+--error ER_BAD_TABLE_ERROR,6
 drop table t1;
 create table t1 (a int) engine=myisam;
 --remove_file $MYSQLD_DATADIR/test/t1.MYD
---error 1105,6,29
+--error ER_BAD_TABLE_ERROR,6,29
 drop table t1;
---error 1051
+--error ER_BAD_TABLE_ERROR
 drop table t1;

=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc	2009-08-13 02:48:57 +0000
+++ b/sql/sql_db.cc	2009-09-17 11:33:23 +0000
@@ -907,6 +907,9 @@ bool mysql_rm_db(THD *thd,char *db,bool 
     remove_db_from_cache(db);
     pthread_mutex_unlock(&LOCK_open);
 
+    Drop_table_error_handler err_handler(thd->get_internal_handler());
+    thd->push_internal_handler(&err_handler);
+
     error= -1;
     /*
       We temporarily disable the binary log while dropping the objects
@@ -939,6 +942,7 @@ bool mysql_rm_db(THD *thd,char *db,bool 
       error = 0;
       reenable_binlog(thd);
     }
+    thd->pop_internal_handler();
   }
   if (!silent && deleted>=0)
   {


Attachment: [text/bzr-bundle] bzr/sergey.glukhov@sun.com-20090917113323-agtvt6240jo1b7yo.bundle
Thread
bzr push into mysql-5.1-bugteam branch (Sergey.Glukhov:3110 to 3111)Bug#42364Sergey Glukhov17 Sep