summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorSinisa@sinisa.nasamreza.org <>2003-03-12 21:43:40 +0200
committerSinisa@sinisa.nasamreza.org <>2003-03-12 21:43:40 +0200
commiteebc00a5312c97e21fa539f1f09dcd6292227111 (patch)
tree276332758171301f44862476c2546cd654350c6e /client
parent5e66c7635a7dfaf9548659649d179bb3d3f609b3 (diff)
downloadmariadb-git-eebc00a5312c97e21fa539f1f09dcd6292227111.tar.gz
A fix for mysql client program when `use` or `connect` were used
without arguments ...
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index e87fbaf8a41..f784f529c46 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2452,9 +2452,11 @@ char *get_arg(char *line, my_bool get_next_arg)
ptr++;
if (*ptr == '\\') // short command was used
ptr+= 2;
- while (!my_isspace(system_charset_info, *ptr)) // skip command
+ while (*ptr &&!my_isspace(system_charset_info, *ptr)) // skip command
ptr++;
}
+ if (!*ptr)
+ return NullS;
while (my_isspace(system_charset_info, *ptr))
ptr++;
if (*ptr == '\'' || *ptr == '\"' || *ptr == '`')