summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2010-11-17 16:05:52 +0100
committerBjorn Munch <bjorn.munch@oracle.com>2010-11-17 16:05:52 +0100
commit32ea070845fd4196ad5d9e5ffc4ce64b736c9869 (patch)
treecb93bdacc84cdb965cb9a52dd76b5290ba5b5ffd /client
parent92a1a112030452b375684e2b8633de0a32dc0912 (diff)
downloadmariadb-git-32ea070845fd4196ad5d9e5ffc4ce64b736c9869.tar.gz
Bug #58257 mysqltest: in if(), ! $var with space is always false
Evaluation would start with the space and thus ignore the $ Added while() to skip past white space
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 9fc692d0d04..b2fcb8fe39e 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -5434,7 +5434,9 @@ void do_block(enum block_cmd cmd, struct st_command* command)
if (*expr_start == '!')
{
not_expr= TRUE;
- expr_start++; /* Step past the '!' */
+ expr_start++; /* Step past the '!', then any whitespace */
+ while (*expr_start && my_isspace(charset_info, *expr_start))
+ expr_start++;
}
/* Find ending ')' */
expr_end= strrchr(expr_start, ')');