diff options
author | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-10-08 11:30:03 +0200 |
---|---|---|
committer | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-10-08 11:30:03 +0200 |
commit | 9edd40c87e355890aabec9b7961a992c6ddc9558 (patch) | |
tree | dd266eeb9fdf5dfd38c8697d140324ca70880f1b | |
parent | b1b958ffab63f4988dc0a8331acd3f3bf357994f (diff) | |
download | mariadb-git-9edd40c87e355890aabec9b7961a992c6ddc9558.tar.gz |
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
-rw-r--r-- | client/mysqltest.cc | 1 | ||||
-rw-r--r-- | mysql-test/r/mysqltest.result | 1 | ||||
-rw-r--r-- | mysql-test/t/mysqltest.test | 3 |
3 files changed, 5 insertions, 0 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index aaa08441e51..00131621bf5 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -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) diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index f68413264e4..2e3a9489593 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -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 diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 9859e73cfae..bcf33aa8c27 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -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; |