List:Internals« Previous MessageNext Message »
From:terry tao Date:November 1 2007 7:47am
Subject:[PATCH] for Bug #26704
View as plain text  
This patch for bug #26704 : Failing DROP DATABASE brings mysql-client out of sync


===== sql/sql_db.cc 1.163 vs edited =====
--- 1.163/sql/sql_db.cc 2007-11-01 15:38:18 +08:00
+++ edited/sql/sql_db.cc        2007-11-01 15:31:17 +08:00
@@ -1000,7 +1000,7 @@
     SELECT DATABASE() in the future). For this we free() thd->db and set
     it to 0.
   */
-  if (thd->db && !strcmp(thd->db, db))
+  if (thd->db && !strcmp(thd->db, db) && error==0 )
     mysql_change_db_impl(thd, NULL, 0, thd->variables.collation_server);
   VOID(pthread_mutex_unlock(&LOCK_mysql_create_db));
   start_waiting_global_read_lock(thd);
Thread
[PATCH] for Bug #26704terry tao1 Nov