diff options
author | unknown <msvensson@shellback.(none)> | 2007-08-08 18:03:44 +0200 |
---|---|---|
committer | unknown <msvensson@shellback.(none)> | 2007-08-08 18:03:44 +0200 |
commit | ddbf9fdc1cc39978add9762f71cd77106e3ce8c4 (patch) | |
tree | 00c9d149ab51471ddce2214bdf63bb6d7b38af04 /client/mysqltest.c | |
parent | c48a3d7943edd420da6314c389e9501a85331d49 (diff) | |
download | mariadb-git-ddbf9fdc1cc39978add9762f71cd77106e3ce8c4.tar.gz |
Don't require a space between "if" and "(". This should
also fix "while" and "connect"
It's now possible to write "if("
client/mysqltest.c:
Don't require a space between for example "if" and "(". This should
also fix "while" and "connect"
mysql-test/t/mysqltest.test:
Remove space between if and ( to check it works
Diffstat (limited to 'client/mysqltest.c')
-rw-r--r-- | client/mysqltest.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 543dabf52f0..65e965ef128 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -4814,9 +4814,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)) |