summaryrefslogtreecommitdiff
path: root/client/mysqlslap.c
diff options
context:
space:
mode:
authorunknown <baker@bk-internal.mysql.com>2007-08-27 20:20:08 +0200
committerunknown <baker@bk-internal.mysql.com>2007-08-27 20:20:08 +0200
commitf69bba4643b641e75506cd2c0556ebad17228105 (patch)
tree13244a393ba1799ea7424e8d860ed8db9e092362 /client/mysqlslap.c
parent87f074815555dcc7c27ca931bf39b7639e092b09 (diff)
parentffc7ef56a3f75cb60fb5c276862b6214354c464b (diff)
downloadmariadb-git-f69bba4643b641e75506cd2c0556ebad17228105.tar.gz
Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into bk-internal.mysql.com:/data0/bk/mysql-5.1-arch client/mysqlslap.c: Auto merged storage/example/ha_example.cc: Auto merged
Diffstat (limited to 'client/mysqlslap.c')
-rw-r--r--client/mysqlslap.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/client/mysqlslap.c b/client/mysqlslap.c
index 78f9efe8bd2..af29df6e4ba 100644
--- a/client/mysqlslap.c
+++ b/client/mysqlslap.c
@@ -1416,15 +1416,15 @@ get_options(int *argc,char ***argv)
tmp_string[sbuf.st_size]= '\0';
my_close(data_file,MYF(0));
if (user_supplied_pre_statements)
- actual_queries= parse_delimiter(tmp_string, &pre_statements,
- delimiter[0]);
+ (void)parse_delimiter(tmp_string, &pre_statements,
+ delimiter[0]);
my_free(tmp_string, MYF(0));
}
else if (user_supplied_pre_statements)
{
- actual_queries= parse_delimiter(user_supplied_pre_statements,
- &pre_statements,
- delimiter[0]);
+ (void)parse_delimiter(user_supplied_pre_statements,
+ &pre_statements,
+ delimiter[0]);
}
if (user_supplied_post_statements && my_stat(user_supplied_post_statements, &sbuf, MYF(0)))
@@ -1447,14 +1447,14 @@ get_options(int *argc,char ***argv)
tmp_string[sbuf.st_size]= '\0';
my_close(data_file,MYF(0));
if (user_supplied_post_statements)
- parse_delimiter(tmp_string, &post_statements,
- delimiter[0]);
+ (void)parse_delimiter(tmp_string, &post_statements,
+ delimiter[0]);
my_free(tmp_string, MYF(0));
}
else if (user_supplied_post_statements)
{
- parse_delimiter(user_supplied_post_statements, &post_statements,
- delimiter[0]);
+ (void)parse_delimiter(user_supplied_post_statements, &post_statements,
+ delimiter[0]);
}
if (verbose >= 2)
@@ -1813,6 +1813,13 @@ limit_not_met:
{
mysql_close(mysql);
+ if (!(mysql= mysql_init(NULL)))
+ {
+ fprintf(stderr,"%s: mysql_init() failed ERROR : %s\n",
+ my_progname, mysql_error(mysql));
+ exit(0);
+ }
+
if (slap_connect(mysql))
goto end;
}
@@ -2002,7 +2009,6 @@ parse_delimiter(const char *script, statement **stmt, char delm)
ptr+= retstr - ptr + 1;
if (isspace(*ptr))
ptr++;
- count++;
}
if (ptr != script+length)