summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2010-08-30 15:19:46 +0200
committerBjorn Munch <bjorn.munch@oracle.com>2010-08-30 15:19:46 +0200
commit1f95aa82f1d1df134e9f900612d3588be259e16c (patch)
treee60ffcb65b5da369e442b4e67347b9ce11b491af /client
parent5f4cb3a9c2b560a2f22900fbba25f6e37fbce603 (diff)
parent6d2ff118bc152f3d785c7275c8fa267543bf91cb (diff)
downloadmariadb-git-1f95aa82f1d1df134e9f900612d3588be259e16c.tar.gz
upmerge 55178,55413
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc16
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)