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)
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 :) */
......@@ -1879,10 +1884,15 @@ pthread_handler_t run_task(void *p)
{
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++;
......
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