Commit c5cf7f43 authored by jani@prima.mysql.com's avatar jani@prima.mysql.com

Fixed bug in mysql client.

parent 19a9f8f9
...@@ -437,7 +437,7 @@ CHANGEABLE_VAR changeable_vars[] = { ...@@ -437,7 +437,7 @@ CHANGEABLE_VAR changeable_vars[] = {
static void usage(int version) static void usage(int version)
{ {
printf("%s Ver 11.2 Distrib %s, for %s (%s)\n", printf("%s Ver 11.3 Distrib %s, for %s (%s)\n",
my_progname, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); my_progname, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
if (version) if (version)
return; return;
...@@ -764,21 +764,23 @@ static int read_lines(bool execute_commands) ...@@ -764,21 +764,23 @@ static int read_lines(bool execute_commands)
line=_cgets(linebuffer); line=_cgets(linebuffer);
} }
#else #else
if (opt_outfile)
{ {
if (glob_buffer.is_empty()) if (opt_outfile)
fflush(OUTFILE); {
fputs(glob_buffer.is_empty() ? "mysql> " : if (glob_buffer.is_empty())
!in_string ? " -> " : fflush(OUTFILE);
in_string == '\'' ? fputs(glob_buffer.is_empty() ? "mysql> " :
" '> " : " \"> ", OUTFILE); !in_string ? " -> " :
in_string == '\'' ?
" '> " : " \"> ", OUTFILE);
}
line=readline((char*) (glob_buffer.is_empty() ? "mysql> " :
!in_string ? " -> " :
in_string == '\'' ?
" '> " : " \"> "));
if (opt_outfile)
fprintf(OUTFILE, "%s\n", line);
} }
line=readline((char*) (glob_buffer.is_empty() ? "mysql> " :
!in_string ? " -> " :
in_string == '\'' ?
" '> " : " \"> "));
if (opt_outfile)
fprintf(OUTFILE, "%s\n", line);
#endif #endif
if (!line) // End of file if (!line) // End of file
{ {
......
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