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 | 32ea070845fd4196ad5d9e5ffc4ce64b736c9869 (patch) | |
tree | cb93bdacc84cdb965cb9a52dd76b5290ba5b5ffd /mysql-test/t/mysqltest.test | |
parent | 92a1a112030452b375684e2b8633de0a32dc0912 (diff) | |
download | mariadb-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 'mysql-test/t/mysqltest.test')
-rw-r--r-- | mysql-test/t/mysqltest.test | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 59ff70e1591..fe04b8c19e0 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1138,6 +1138,11 @@ if (!$counter) { echo Counter is not 0, (counter=10); } +if (! $counter) +{ + let $counter=5; +} +echo Counter should still be 10, is $counter; let $counter=0; if($counter) { @@ -1147,6 +1152,10 @@ if (!$counter) { echo Counter is not 0, (counter=0); } +if (! $counter) +{ + echo Not space var works; +} # ---------------------------------------------------------------------------- # Test if with some non-numerics |