List:Commits« Previous MessageNext Message »
From:Nirbhay Choubey Date:January 13 2011 10:31am
Subject:bzr commit into mysql-trunk branch (nirbhay.choubey:3498)
View as plain text  
#At file:///home/nirbhay/Project/mysql/repo/bugs/source/mysql-trunk/ based on revid:ole.john.aske@stripped

 3498 Nirbhay Choubey	2011-01-13 [merge]
      Merging from mysql-5.5.

    modified:
      client/mysqlslap.c
=== modified file 'client/mysqlslap.c'
--- a/client/mysqlslap.c	2010-10-06 15:08:00 +0000
+++ b/client/mysqlslap.c	2011-01-13 10:30:59 +0000
@@ -1509,7 +1509,12 @@ generate_primary_key_list(MYSQL *mysql, 
       exit(1);
     }
 
-    result= mysql_store_result(mysql);
+    if (!(result= mysql_store_result(mysql)))
+    {
+      fprintf(stderr, "%s: Error when storing result: %d %s\n",
+              my_progname, mysql_errno(mysql), mysql_error(mysql));
+      exit(1);
+    }
     primary_keys_number_of= mysql_num_rows(result);
 
     /* So why check this? Blackhole :) */
@@ -1881,10 +1886,15 @@ limit_not_met:
       {
         if (mysql_field_count(mysql))
         {
-          result= mysql_store_result(mysql);
-          while ((row = mysql_fetch_row(result)))
-            counter++;
-          mysql_free_result(result);
+          if (!(result= mysql_store_result(mysql)))
+            fprintf(stderr, "%s: Error when storing result: %d %s\n",
+                    my_progname, mysql_errno(mysql), mysql_error(mysql));
+          else
+          {
+            while ((row= mysql_fetch_row(result)))
+              counter++;
+            mysql_free_result(result);
+          }
         }
       } while(mysql_next_result(mysql) == 0);
       queries++;


Attachment: [text/bzr-bundle]
Thread
bzr commit into mysql-trunk branch (nirbhay.choubey:3498)Nirbhay Choubey13 Jan