[Commits] Rev 4446: Revert incorrect/redundant fix for old BUG#34656 in http://bazaar.launchpad.net/~maria-captains/maria/10.0

knielsen at knielsen-hq.org knielsen at knielsen-hq.org
Thu Nov 13 10:20:40 EET 2014


At http://bazaar.launchpad.net/~maria-captains/maria/10.0

------------------------------------------------------------
revno: 4446
revision-id: knielsen at knielsen-hq.org-20141113082040-m33uebbmhy6yfdmv
parent: knielsen at knielsen-hq.org-20141113081912-lo5ktlj0pk5rbaki
committer: Kristian Nielsen <knielsen at knielsen-hq.org>
branch nick: work-10.0
timestamp: Thu 2014-11-13 09:20:40 +0100
message:
  Revert incorrect/redundant fix for old BUG#34656
  
  The real bug was that open_tables() returned error in case of
  thd->killed() without properly calling thd->send_kill_message()
  to set the correct error. This was fixed some time ago.
  
  So remove the, now redundant, extra checks for thd->is_error(),
  possibly allowing to catch in debug builds more incorrect
  error handling cases.
=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2014-10-09 08:30:11 +0000
+++ b/sql/sql_show.cc	2014-11-13 08:20:40 +0000
@@ -5285,13 +5285,10 @@ static int get_schema_tables_record(THD
     const char *error= thd->is_error() ? thd->get_stmt_da()->message() : "";
     table->field[20]->store(error, strlen(error), cs);
 
-    if (thd->is_error())
-    {
-      push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
-                   thd->get_stmt_da()->sql_errno(),
-                   thd->get_stmt_da()->message());
-      thd->clear_error();
-    }
+    push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
+                 thd->get_stmt_da()->sql_errno(),
+                 thd->get_stmt_da()->message());
+    thd->clear_error();
   }
 
   DBUG_RETURN(schema_table_store_record(thd, table));
@@ -5452,10 +5449,9 @@ static int get_schema_column_record(THD
         I.e. we are in SELECT FROM INFORMATION_SCHEMA.COLUMS
         rather than in SHOW COLUMNS
       */
-      if (thd->is_error())
-        push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
-                     thd->get_stmt_da()->sql_errno(),
-                     thd->get_stmt_da()->message());
+      push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
+                   thd->get_stmt_da()->sql_errno(),
+                   thd->get_stmt_da()->message());
       thd->clear_error();
       res= 0;
     }



More information about the commits mailing list