Commit e17c9279 authored by Nirbhay Choubey's avatar Nirbhay Choubey

Merging from mysql-5.1.

parents ba38eef6 cbeb4e76
...@@ -1507,7 +1507,12 @@ generate_primary_key_list(MYSQL *mysql, option_string *engine_stmt) ...@@ -1507,7 +1507,12 @@ generate_primary_key_list(MYSQL *mysql, option_string *engine_stmt)
exit(1); 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); primary_keys_number_of= mysql_num_rows(result);
/* So why check this? Blackhole :) */ /* So why check this? Blackhole :) */
...@@ -1879,11 +1884,16 @@ pthread_handler_t run_task(void *p) ...@@ -1879,11 +1884,16 @@ pthread_handler_t run_task(void *p)
{ {
if (mysql_field_count(mysql)) if (mysql_field_count(mysql))
{ {
result= mysql_store_result(mysql); if (!(result= mysql_store_result(mysql)))
while ((row = mysql_fetch_row(result))) 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++; counter++;
mysql_free_result(result); mysql_free_result(result);
} }
}
} while(mysql_next_result(mysql) == 0); } while(mysql_next_result(mysql) == 0);
queries++; queries++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment