mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
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
This commit is contained in:
parent
57d40c6ba4
commit
9a3d3f4724
3 changed files with 5 additions and 0 deletions
|
@ -7708,6 +7708,7 @@ int main(int argc, char **argv)
|
||||||
if (!ok_to_do)
|
if (!ok_to_do)
|
||||||
{
|
{
|
||||||
if (command->type == Q_SOURCE ||
|
if (command->type == Q_SOURCE ||
|
||||||
|
command->type == Q_ERROR ||
|
||||||
command->type == Q_WRITE_FILE ||
|
command->type == Q_WRITE_FILE ||
|
||||||
command->type == Q_APPEND_FILE ||
|
command->type == Q_APPEND_FILE ||
|
||||||
command->type == Q_PERL)
|
command->type == Q_PERL)
|
||||||
|
|
|
@ -317,6 +317,7 @@ here is the sourced script
|
||||||
outer=2 ifval=0
|
outer=2 ifval=0
|
||||||
outer=1 ifval=1
|
outer=1 ifval=1
|
||||||
here is the sourced script
|
here is the sourced script
|
||||||
|
ERROR 42S02: Table 'test.nowhere' doesn't exist
|
||||||
|
|
||||||
In loop
|
In loop
|
||||||
here is the sourced script
|
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
|
# 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 $outer= 2; # Number of outer loops
|
||||||
let $ifval= 0; # false 1st time
|
let $ifval= 0; # false 1st time
|
||||||
while ($outer)
|
while ($outer)
|
||||||
|
@ -862,6 +863,8 @@ while ($outer)
|
||||||
|
|
||||||
if ($ifval) {
|
if ($ifval) {
|
||||||
--source $MYSQLTEST_VARDIR/tmp/sourced.inc
|
--source $MYSQLTEST_VARDIR/tmp/sourced.inc
|
||||||
|
--error ER_NO_SUCH_TABLE
|
||||||
|
SELECT * from nowhere;
|
||||||
}
|
}
|
||||||
dec $outer;
|
dec $outer;
|
||||||
inc $ifval;
|
inc $ifval;
|
||||||
|
|
Loading…
Add table
Reference in a new issue