summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-06-01 17:53:59 +0200
committerSergei Golubchik <sergii@pisem.net>2012-06-01 17:53:59 +0200
commit34f2f8ea41726d98e50752ff3453ebde70912c35 (patch)
tree4c73bb7332c41f205828338d94ab1714564aa7dd /client
parent57f824b0990b0a8708665a4a9ede245ce6064539 (diff)
downloadmariadb-git-34f2f8ea41726d98e50752ff3453ebde70912c35.tar.gz
MDEV-256 lp:995501 - mysqltest attempts to parse Perl code inside a block
with false condition, gets confused and throws wrong errors
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 68f076818dd..8f955ff586b 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -8259,8 +8259,12 @@ int main(int argc, char **argv)
command->abort_on_error= (command->expected_errors.count == 0 &&
abort_on_error);
- /* delimiter needs to be executed so we can continue to parse */
- ok_to_do= cur_block->ok || command->type == Q_DELIMITER;
+ /*
+ some commmands need to be executed or at least parsed unconditionally,
+ because they change the grammar.
+ */
+ ok_to_do= cur_block->ok || command->type == Q_DELIMITER
+ || command->type == Q_PERL;
/*
Some commands need to be "done" the first time if they may get
re-iterated over in a true context. This can only happen if there's
@@ -8271,8 +8275,7 @@ int main(int argc, char **argv)
if (command->type == Q_SOURCE ||
command->type == Q_ERROR ||
command->type == Q_WRITE_FILE ||
- command->type == Q_APPEND_FILE ||
- command->type == Q_PERL)
+ command->type == Q_APPEND_FILE)
{
for (struct st_block *stb= cur_block-1; stb >= block_stack; stb--)
{