summaryrefslogtreecommitdiff
path: root/client/mysqltest.c
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.(none)>2007-08-08 18:03:56 +0200
committerunknown <msvensson@pilot.(none)>2007-08-08 18:03:56 +0200
commitff985f06903c6a3c393c26c64a944f19337fcd36 (patch)
tree67983ded3e88878633e1dc2bd2dcdaab50a5ea4d /client/mysqltest.c
parent365b21b3078051d91ce05f5b5c6b3f95050b5359 (diff)
parentddbf9fdc1cc39978add9762f71cd77106e3ce8c4 (diff)
downloadmariadb-git-ff985f06903c6a3c393c26c64a944f19337fcd36.tar.gz
Merge 192.168.0.7:mysql/mysql-5.0-maint
into pilot.(none):/data/msvensson/mysql/mysql-5.0-maint client/mysqltest.c: Auto merged mysql-test/t/mysqltest.test: Auto merged
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))