Commit 9edd40c8 authored by Bjorn Munch's avatar Bjorn Munch

Bug #47218 mysqltest ignores "error" command inside if inside loop

This was affected by same problem as append_file etc.
Added Q_ERROR to special handling, and added small test
parent b1b958ff
......@@ -7708,6 +7708,7 @@ int main(int argc, char **argv)
if (!ok_to_do)
{
if (command->type == Q_SOURCE ||
command->type == Q_ERROR ||
command->type == Q_WRITE_FILE ||
command->type == Q_APPEND_FILE ||
command->type == Q_PERL)
......
......@@ -317,6 +317,7 @@ here is the sourced script
outer=2 ifval=0
outer=1 ifval=1
here is the sourced script
ERROR 42S02: Table 'test.nowhere' doesn't exist
In loop
here is the sourced script
......
......@@ -854,6 +854,7 @@ while ($outer)
}
# Test source in an if in a while which is false on 1st iteration
# Also test --error in same context
let $outer= 2; # Number of outer loops
let $ifval= 0; # false 1st time
while ($outer)
......@@ -862,6 +863,8 @@ while ($outer)
if ($ifval) {
--source $MYSQLTEST_VARDIR/tmp/sourced.inc
--error ER_NO_SUCH_TABLE
SELECT * from nowhere;
}
dec $outer;
inc $ifval;
......
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