Commit 2d2da6e7 authored by Bjorn Munch's avatar Bjorn Munch

Bug #55582 mtr root detection (and if-expression execution) broken

Follow-up patch: added test cases for -0 and while
parent 5e92df6e
...@@ -395,6 +395,7 @@ Counter is greater than 0, (counter=10) ...@@ -395,6 +395,7 @@ Counter is greater than 0, (counter=10)
Counter is not 0, (counter=0) Counter is not 0, (counter=0)
Counter is true, (counter=alpha) Counter is true, (counter=alpha)
Beta is true Beta is true
while with string, only once
1 1
Testing while with not Testing while with not
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply
......
...@@ -1119,10 +1119,21 @@ if ($counter) ...@@ -1119,10 +1119,21 @@ if ($counter)
{ {
echo oops, space is true; echo oops, space is true;
} }
let $counter=-0;
if ($counter)
{
echo oops, -0 is true;
}
if (beta) if (beta)
{ {
echo Beta is true; echo Beta is true;
} }
let $counter=gamma;
while ($counter)
{
echo while with string, only once;
let $counter=000;
}
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Test while, { and } # Test while, { and }
......
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