diff options
Diffstat (limited to 'client/mysqlslap.c')
-rw-r--r-- | client/mysqlslap.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/client/mysqlslap.c b/client/mysqlslap.c index 02a0cbd04c5..1c54ba86718 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -140,7 +140,8 @@ static my_bool opt_compress= FALSE, tty_password= FALSE, auto_generate_sql= FALSE; const char *auto_generate_sql_type= "mixed"; -static unsigned long connect_flags= CLIENT_MULTI_RESULTS; +static unsigned long connect_flags= CLIENT_MULTI_RESULTS | + CLIENT_MULTI_STATEMENTS; static int verbose, delimiter_length; static uint commit_rate; @@ -1877,13 +1878,16 @@ limit_not_met: } } - if (mysql_field_count(mysql)) + do { - result= mysql_store_result(mysql); - while ((row = mysql_fetch_row(result))) - counter++; - mysql_free_result(result); - } + if (mysql_field_count(mysql)) + { + result= mysql_store_result(mysql); + while ((row = mysql_fetch_row(result))) + counter++; + mysql_free_result(result); + } + } while(mysql_next_result(mysql) == 0); queries++; if (commit_rate && commit_rate <= trans_counter) |