List:Commits« Previous MessageNext Message »
From:tim Date:November 13 2007 7:31pm
Subject:bk commit into 5.1 tree (tsmith:1.2607) BUG#25146
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tsmith. When tsmith 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-11-13 12:30:53-07:00, tsmith@stripped +1 -0
  Bug #25146: Some warnings/errors not shown when using --show-warnings
  
  In several cases, an error when processing the query would cause mysql to
  return to the top level without printing warnings.  Fix is to always
  print any available warnings before returning to the top level.

  client/mysql.cc@stripped, 2007-11-13 12:30:50-07:00, tsmith@stripped +8 -13
    In com_go(), ensure that warnings are printed even if an error
    occurred when processing the query.  Before this patch, an error
    in several places would return to the top level without printing
    associated warnings.

diff -Nrup a/client/mysql.cc b/client/mysql.cc
--- a/client/mysql.cc	2007-09-24 03:41:22 -06:00
+++ b/client/mysql.cc	2007-11-13 12:30:50 -07:00
@@ -2126,33 +2126,26 @@ com_go(String *buffer,char *line __attri
   }
 #endif
 
-  if (error)
-  {
-    executing_query= 0;
-    buffer->length(0); // Remove query on error
-    return error;
-  }
-  error=0;
   buffer->length(0);
 
+  if (error)
+    goto end;
+
   do
   {
     if (quick)
     {
       if (!(result=mysql_use_result(&mysql)) && mysql_field_count(&mysql))
       {
-        executing_query= 0;
-        return put_error(&mysql);
+        error= put_error(&mysql);
+        goto end;
       }
     }
     else
     {
       error= mysql_store_result_for_lazy(&result);
       if (error)
-      {
-        executing_query= 0;
-        return error;
-      }
+        goto end;
     }
 
     if (verbose >= 3 || !opt_silent)
@@ -2228,6 +2221,8 @@ com_go(String *buffer,char *line __attri
   } while (!(err= mysql_next_result(&mysql)));
   if (err >= 1)
     error= put_error(&mysql);
+
+end:
 
   if (show_warnings == 1 && warnings >= 1) /* Show warnings if any */
   {
Thread
bk commit into 5.1 tree (tsmith:1.2607) BUG#25146tim13 Nov