List:Commits« Previous MessageNext Message »
From:msvensson Date:December 8 2006 3:43pm
Subject:bk commit into 4.1 tree (msvensson:1.2584) BUG#19410
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson 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, 2006-12-08 16:43:50+01:00, msvensson@neptunus.(none) +1 -0
  Bug#19410 Test 'kill' fails on Windows + SCO
   - Use "mysql_field_count" to determine if there is a need to
     call "mysql_store_result"

  client/mysqltest.c@stripped, 2006-12-08 16:43:47+01:00, msvensson@neptunus.(none) +5 -3
    Only call 'mysql_store_result' if 'mysql_field_count' is greater than 0
    indicating that this query has a result set.  This change is mainly since
    if mysql_store_result fails the value returned by mysql_field_count will be reset.

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-4.1-maint

--- 1.229/client/mysqltest.c	2006-12-08 16:43:56 +01:00
+++ 1.230/client/mysqltest.c	2006-12-08 16:43:56 +01:00
@@ -4680,10 +4680,9 @@ void run_query_normal(struct st_connecti
     }
 
     /*
-      Store the result. If res is NULL, use mysql_field_count to
-      determine if that was expected
+      Store the result of the query if it will return any fields
     */
-    if (!(res= mysql_store_result(mysql)) && mysql_field_count(mysql))
+    if (mysql_field_count(mysql) && ((res= mysql_store_result(mysql)) == 0))
     {
       handle_error(command, mysql_errno(mysql), mysql_error(mysql),
 		   mysql_sqlstate(mysql), ds);
@@ -4735,7 +4734,10 @@ void run_query_normal(struct st_connecti
     }
 
     if (res)
+    {
       mysql_free_result(res);
+      res= 0;
+    }
     counter++;
   } while (!(err= mysql_next_result(mysql)));
   if (err > 0)
Thread
bk commit into 4.1 tree (msvensson:1.2584) BUG#19410msvensson8 Dec