Commit b924ee8d authored by unknown's avatar unknown

Behavior change to preserve schema unless you specify autogenerated SQL or create values.


client/mysqlslap.c:
  Behavior change
parent dac2f889
...@@ -266,6 +266,7 @@ int main(int argc, char **argv) ...@@ -266,6 +266,7 @@ int main(int argc, char **argv)
my_end(0); my_end(0);
exit(1); exit(1);
} }
/* globals? Yes, so we only have to run strlen once */ /* globals? Yes, so we only have to run strlen once */
delimiter_length= strlen(delimiter); delimiter_length= strlen(delimiter);
...@@ -455,9 +456,10 @@ static struct my_option my_long_options[] = ...@@ -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, (gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
0}, 0},
{"preserve-schema", OPT_MYSQL_PRESERVE_SCHEMA, {"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, (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, {"protocol", OPT_MYSQL_PROTOCOL,
"The protocol of connection (tcp,socket,pipe,memory).", "The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
...@@ -750,6 +752,9 @@ get_options(int *argc,char ***argv) ...@@ -750,6 +752,9 @@ get_options(int *argc,char ***argv)
if (!user) if (!user)
user= (char *)"root"; user= (char *)"root";
if (create_string || auto_generate_sql )
opt_preserve= FALSE;
if (auto_generate_sql && (create_string || user_supplied_query)) if (auto_generate_sql && (create_string || user_supplied_query))
{ {
fprintf(stderr, fprintf(stderr,
......
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