summaryrefslogtreecommitdiff
path: root/client/mysqltest.c
diff options
context:
space:
mode:
authormsvensson@pilot.(none) <>2007-08-08 18:03:56 +0200
committermsvensson@pilot.(none) <>2007-08-08 18:03:56 +0200
commit179cd4e01684695b69f20a490387fe77f3e501f9 (patch)
tree67983ded3e88878633e1dc2bd2dcdaab50a5ea4d /client/mysqltest.c
parenta2f59d74f4e05ef58e44a66eb5c3a870aefa439d (diff)
parent6d2f738ff990a30b583440cf3903285d198188c4 (diff)
downloadmariadb-git-179cd4e01684695b69f20a490387fe77f3e501f9.tar.gz
Merge 192.168.0.7:mysql/mysql-5.0-maint
into pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
Diffstat (limited to 'client/mysqltest.c')
-rw-r--r--client/mysqltest.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 7308fb35207..1ce52cd8527 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -4820,9 +4820,13 @@ int read_command(struct st_command** command_ptr)
if (!(command->query_buf= command->query= my_strdup(p, MYF(MY_WME))))
die("Out of memory");
- /* Calculate first word and first argument */
- for (p= command->query; *p && !my_isspace(charset_info, *p) ; p++) ;
+ /* Calculate first word length(the command), terminated by space or ( */
+ p= command->query;
+ while (*p && !my_isspace(charset_info, *p) && *p != '(')
+ p++;
command->first_word_len= (uint) (p - command->query);
+ DBUG_PRINT("info", ("first_word: %.*s",
+ command->first_word_len, command->query));
/* Skip spaces between command and first argument */
while (*p && my_isspace(charset_info, *p))