diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2010-11-17 16:05:52 +0100 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2010-11-17 16:05:52 +0100 |
commit | d718af063e9efd99e6b0bcb908a7995f33046ab3 (patch) | |
tree | cb93bdacc84cdb965cb9a52dd76b5290ba5b5ffd /client | |
parent | 9142f7462b48e3d9201100d83c094b315e1750fc (diff) | |
download | mariadb-git-d718af063e9efd99e6b0bcb908a7995f33046ab3.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.cc | 4 |
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, ')'); |