1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

upmerge 55178,55413

This commit is contained in:
Bjorn Munch
2010-08-30 15:19:46 +02:00
6 changed files with 49 additions and 7 deletions

View File

@ -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)