List:Commits« Previous MessageNext Message »
From:gluh Date:April 19 2007 1:49pm
Subject:bk commit into 5.0 tree (gluh:1.2457) BUG#27499
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-04-19 16:49:21+05:00, gluh@stripped +1 -0
  Bug#27499 DROP TABLE race with SHOW TABLE STATUS
  They can drop table after table names list creation and before table opening.
  We open non existing table and get ER_NO_SUCH_TABLE error.
  In this case we do not store the record into I_S table and clear error.

  sql/sql_show.cc@stripped, 2007-04-19 16:49:20+05:00, gluh@stripped +25 -11
    Hide error for not existing table

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	gluh
# Host:	eagle.(none)
# Root:	/home/gluh/MySQL/Merge/5.0-opt

--- 1.345/sql/sql_show.cc	2007-03-27 20:34:13 +05:00
+++ 1.346/sql/sql_show.cc	2007-04-19 16:49:20 +05:00
@@ -2314,18 +2314,32 @@ int get_all_tables(THD *thd, TABLE_LIST 
             res= open_normal_and_derived_tables(thd, show_table_list,
                                                 MYSQL_LOCK_IGNORE_FLUSH);
             lex->sql_command= save_sql_command;
-            /*
-              We should use show_table_list->alias instead of 
-              show_table_list->table_name because table_name
-              could be changed during opening of I_S tables. It's safe
-              to use alias because alias contains original table name 
-              in this case.
+            /* 
+              They can drop table after table names list creation and
+              before table opening. We open non existing table and 
+              get ER_NO_SUCH_TABLE error. In this case we do not store
+              the record into I_S table and clear error.
             */
-            res= schema_table->process_table(thd, show_table_list, table,
-                                             res, orig_base_name,
-                                             show_table_list->alias);
-            close_tables_for_reopen(thd, &show_table_list);
-            DBUG_ASSERT(!lex->query_tables_own_last);
+            if (thd->net.last_errno == ER_NO_SUCH_TABLE)
+            {
+              res= 0;
+              thd->clear_error();
+            }
+            else
+            {
+              /*
+                We should use show_table_list->alias instead of 
+                show_table_list->table_name because table_name
+                could be changed during opening of I_S tables. It's safe
+                to use alias because alias contains original table name 
+                in this case.
+              */
+              res= schema_table->process_table(thd, show_table_list, table,
+                                               res, orig_base_name,
+                                               show_table_list->alias);
+              close_tables_for_reopen(thd, &show_table_list);
+              DBUG_ASSERT(!lex->query_tables_own_last);
+            }
             if (res)
               goto err;
           }
Thread
bk commit into 5.0 tree (gluh:1.2457) BUG#27499gluh19 Apr