Commit f69cfe7e authored by unknown's avatar unknown

Bug#20365 mysqlslap fails with error message about result sets

 - Using CLIENT_MULTI_RESULTS is needed to execute stored procedures


client/mysqlslap.c:
  Use CLIENT_MULTI_RESULTS as connect_flags for all connections to the MySQL server.
parent f4f35fdd
...@@ -130,6 +130,8 @@ static my_bool opt_compress= FALSE, tty_password= FALSE, ...@@ -130,6 +130,8 @@ static my_bool opt_compress= FALSE, tty_password= FALSE,
opt_silent= FALSE, opt_silent= FALSE,
auto_generate_sql= FALSE; auto_generate_sql= FALSE;
static unsigned long connect_flags= CLIENT_MULTI_RESULTS;
static int verbose, num_int_cols, num_char_cols, delimiter_length; static int verbose, num_int_cols, num_char_cols, delimiter_length;
static int iterations; static int iterations;
static char *default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME; static char *default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
...@@ -243,7 +245,6 @@ static int gettimeofday(struct timeval *tp, void *tzp) ...@@ -243,7 +245,6 @@ static int gettimeofday(struct timeval *tp, void *tzp)
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
MYSQL mysql; MYSQL mysql;
int client_flag= 0;
int x; int x;
unsigned long long client_limit; unsigned long long client_limit;
statement *eptr; statement *eptr;
...@@ -293,12 +294,11 @@ int main(int argc, char **argv) ...@@ -293,12 +294,11 @@ int main(int argc, char **argv)
#endif #endif
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset); mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
client_flag|= CLIENT_MULTI_RESULTS;
if (!opt_only_print) if (!opt_only_print)
{ {
if (!(mysql_real_connect(&mysql, host, user, opt_password, if (!(mysql_real_connect(&mysql, host, user, opt_password,
NULL, opt_mysql_port, NULL, opt_mysql_port,
opt_mysql_unix_port, client_flag))) opt_mysql_unix_port, connect_flags)))
{ {
fprintf(stderr,"%s: Error when connecting to server: %s\n", fprintf(stderr,"%s: Error when connecting to server: %s\n",
my_progname,mysql_error(&mysql)); my_progname,mysql_error(&mysql));
...@@ -1141,7 +1141,7 @@ run_task(thread_context *con) ...@@ -1141,7 +1141,7 @@ run_task(thread_context *con)
create_schema_string, create_schema_string,
opt_mysql_port, opt_mysql_port,
opt_mysql_unix_port, opt_mysql_unix_port,
0))) connect_flags)))
{ {
fprintf(stderr,"%s: %s\n",my_progname,mysql_error(mysql)); fprintf(stderr,"%s: %s\n",my_progname,mysql_error(mysql));
goto end; goto end;
......
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