summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <jani@prima.mysql.com>2000-11-17 21:36:47 +0200
committerunknown <jani@prima.mysql.com>2000-11-17 21:36:47 +0200
commit59d2c0df50e9da4bca54e8ef06ecf3847ad9186d (patch)
tree94d96ce8d2471bd71e7d1a61c1aeb8d0ef185d5f /client
parent19fc413aa25290016069efbc9e25e2e79b3ea7c9 (diff)
downloadmariadb-git-59d2c0df50e9da4bca54e8ef06ecf3847ad9186d.tar.gz
Fixed bug in mysql client.
client/mysql.cc: Fixed buf with the batch mode.
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc30
1 files changed, 16 insertions, 14 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index fbae6c6d341..8b43f2e2f0d 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -437,7 +437,7 @@ CHANGEABLE_VAR changeable_vars[] = {
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);
if (version)
return;
@@ -764,21 +764,23 @@ static int read_lines(bool execute_commands)
line=_cgets(linebuffer);
}
#else
- if (opt_outfile)
{
- if (glob_buffer.is_empty())
- fflush(OUTFILE);
- fputs(glob_buffer.is_empty() ? "mysql> " :
- !in_string ? " -> " :
- in_string == '\'' ?
- " '> " : " \"> ", OUTFILE);
+ if (opt_outfile)
+ {
+ if (glob_buffer.is_empty())
+ fflush(OUTFILE);
+ fputs(glob_buffer.is_empty() ? "mysql> " :
+ !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
if (!line) // End of file
{