diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 7 | ||||
-rw-r--r-- | client/mysql_upgrade.c | 4 | ||||
-rw-r--r-- | client/mysqlbinlog.cc | 5 |
3 files changed, 10 insertions, 6 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 9f7ad685d05..4f6c313d3c5 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -4593,8 +4593,11 @@ static char *get_arg(char *line, get_arg_mode mode) } for (start=ptr ; *ptr; ptr++) { - if ((*ptr == '\\' && ptr[1]) || // escaped character - (!short_cmd && qtype && *ptr == qtype && ptr[1] == qtype)) // quote + /* if short_cmd use historical rules (only backslash) otherwise SQL rules */ + if (short_cmd + ? (*ptr == '\\' && ptr[1]) // escaped character + : (*ptr == '\\' && ptr[1] && qtype != '`') || // escaped character + (qtype && *ptr == qtype && ptr[1] == qtype)) // quote { // Remove (or skip) the backslash (or a second quote) if (mode != CHECK) diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index c8e21443b34..0b81a131124 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -164,8 +164,8 @@ static struct my_option my_long_options[]= "server with which it was built/distributed.", &opt_version_check, &opt_version_check, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, - {"write-binlog", OPT_WRITE_BINLOG, "All commands including those, " - "issued by mysqlcheck, are written to the binary log.", + {"write-binlog", OPT_WRITE_BINLOG, "All commands including those " + "issued by mysqlcheck are written to the binary log.", &opt_write_binlog, &opt_write_binlog, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 804c6314ef9..232b53cf2ef 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -2483,10 +2483,11 @@ int main(int argc, char** argv) if (!argc || opt_version) { - if (!argc) - usage(); if (!opt_version) + { + usage(); retval= ERROR_STOP; + } goto err; } |