diff options
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r-- | client/mysqltest.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 6c8f1ee3561..b0e9a3d00be 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -5255,8 +5255,10 @@ void do_connect(struct st_command *command) } #endif +#ifndef EMBEDDED_LIBRARY if (opt_protocol) mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol); +#endif #ifdef HAVE_SMEM if (con_shm) @@ -5542,6 +5544,8 @@ int read_line(char *buf, int size) char c, UNINIT_VAR(last_quote), last_char= 0; char *p= buf, *buf_end= buf + size - 1; int skip_char= 0; + my_bool have_slash= FALSE; + enum {R_NORMAL, R_Q, R_SLASH_IN_Q, R_COMMENT, R_LINE_START} state= R_LINE_START; DBUG_ENTER("read_line"); @@ -5613,9 +5617,13 @@ int read_line(char *buf, int size) } else if (c == '\'' || c == '"' || c == '`') { - last_quote= c; - state= R_Q; + if (! have_slash) + { + last_quote= c; + state= R_Q; + } } + have_slash= (c == '\\'); break; case R_COMMENT: @@ -6228,8 +6236,10 @@ get_one_option(int optid, const struct my_option *opt, char *argument) print_version(); exit(0); case OPT_MYSQL_PROTOCOL: +#ifndef EMBEDDED_LIBRARY opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib, opt->name); +#endif break; case '?': usage(); @@ -7982,8 +7992,10 @@ int main(int argc, char **argv) mysql_options(&con->mysql, MYSQL_SET_CHARSET_DIR, opt_charsets_dir); +#ifndef EMBEDDED_LIBRARY if (opt_protocol) mysql_options(&con->mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); +#endif #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) |