Don't require a space between "if" and "(". This should

also fix "while" and "connect"
It's now possible to write "if("
parent 792ac3fd
...@@ -4814,9 +4814,13 @@ int read_command(struct st_command** command_ptr) ...@@ -4814,9 +4814,13 @@ int read_command(struct st_command** command_ptr)
if (!(command->query_buf= command->query= my_strdup(p, MYF(MY_WME)))) if (!(command->query_buf= command->query= my_strdup(p, MYF(MY_WME))))
die("Out of memory"); die("Out of memory");
/* Calculate first word and first argument */ /* Calculate first word length(the command), terminated by space or ( */
for (p= command->query; *p && !my_isspace(charset_info, *p) ; p++) ; p= command->query;
while (*p && !my_isspace(charset_info, *p) && *p != '(')
p++;
command->first_word_len= (uint) (p - command->query); 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 */ /* Skip spaces between command and first argument */
while (*p && my_isspace(charset_info, *p)) while (*p && my_isspace(charset_info, *p))
......
...@@ -969,7 +969,7 @@ if (!$counter) ...@@ -969,7 +969,7 @@ if (!$counter)
echo Counter is not 0, (counter=10); echo Counter is not 0, (counter=10);
} }
let $counter=0; let $counter=0;
if ($counter) if($counter)
{ {
echo Counter is greater than 0, (counter=0); echo Counter is greater than 0, (counter=0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment