diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-09-17 21:39:07 +0500 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-09-17 21:39:07 +0500 |
commit | ea04054077e8ad6dcacabd077a32cdee364f36d7 (patch) | |
tree | ef98302fe606b670100b6372efdd2551469facb3 /client/mysqlslap.c | |
parent | 9a20ca1390268a8091106635feaf7056c047cbea (diff) | |
download | mariadb-git-ea04054077e8ad6dcacabd077a32cdee364f36d7.tar.gz |
Fixed bug #29985.
Multiple-result processing is required during the execution
of CALL statements for stored procedures, however the mysqlslap
client lacked that processing.
client/mysqlslap.c:
Fixed bug #29985.
1. Connection flags have been changed: the CLIENT_MULTI_STATEMENTS
flag has been added.
2. The run_task function has been modified to process multiple
result sets.
mysql-test/t/mysqlslap.test:
Added test case for bug #29985.
mysql-test/r/mysqlslap.result:
Added test case for bug #29985.
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) |