diff options
author | brian@zim.(none) <> | 2006-03-28 17:59:11 -0800 |
---|---|---|
committer | brian@zim.(none) <> | 2006-03-28 17:59:11 -0800 |
commit | 097804fbdb1d20edbeb83555399747047e2ddbe5 (patch) | |
tree | 09638f1cfc82f145cf770f22e217cda472798151 /client/mysqlslap.c | |
parent | 91ea8c05d9133c6137d1610ea429a669afd03e67 (diff) | |
download | mariadb-git-097804fbdb1d20edbeb83555399747047e2ddbe5.tar.gz |
Behavior change to preserve schema unless you specify autogenerated SQL or create values.
Diffstat (limited to 'client/mysqlslap.c')
-rw-r--r-- | client/mysqlslap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/client/mysqlslap.c b/client/mysqlslap.c index e30b8537b79..904bf432071 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -266,6 +266,7 @@ int main(int argc, char **argv) my_end(0); exit(1); } + /* globals? Yes, so we only have to run strlen once */ delimiter_length= strlen(delimiter); @@ -455,9 +456,10 @@ static struct my_option my_long_options[] = (gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0}, {"preserve-schema", OPT_MYSQL_PRESERVE_SCHEMA, - "Preserve the schema from the mysqlslap run.", + "Preserve the schema from the mysqlslap run, this happens unless \ + --auto-generate-sql or --create are used.", (gptr*) &opt_preserve, (gptr*) &opt_preserve, 0, GET_BOOL, - NO_ARG, 0, 0, 0, 0, 0, 0}, + NO_ARG, TRUE, 0, 0, 0, 0, 0}, {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -750,6 +752,9 @@ get_options(int *argc,char ***argv) if (!user) user= (char *)"root"; + if (create_string || auto_generate_sql ) + opt_preserve= FALSE; + if (auto_generate_sql && (create_string || user_supplied_query)) { fprintf(stderr, |