mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
Bug #55582 mtr root detection (and if-expression execution) broken
if() treated any non-numeric string as false Fixed to treat those as true instead Added some test cases Fixed missing $ in variable name in include/mix2.inc
This commit is contained in:
parent
f3d4e72cf1
commit
5e92df6e0e
4 changed files with 39 additions and 3 deletions
|
|
@ -1105,6 +1105,25 @@ if (!$counter)
|
|||
echo Counter is not 0, (counter=0);
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Test if with some non-numerics
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
let $counter=alpha;
|
||||
if ($counter)
|
||||
{
|
||||
echo Counter is true, (counter=alpha);
|
||||
}
|
||||
let $counter= ;
|
||||
if ($counter)
|
||||
{
|
||||
echo oops, space is true;
|
||||
}
|
||||
if (beta)
|
||||
{
|
||||
echo Beta is true;
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Test while, { and }
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue