Bug #85823 mysqltest write_file in non-executed if block breaks parsing

Submitted: 6 Apr 2017 7:23 Modified: 25 Apr 2017 14:42
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:Tests Severity:S3 (Non-critical)
Version:5.6+ OS:Any
Assigned to: CPU Architecture:Any
Tags: mtr, mysql test framework, mysqltest

[6 Apr 2017 7:23] Laurynas Biveinis
Description:
If there is write_file in an if block, which is not executed, mysqltest will fail to find the end of that block.

How to repeat:
let $counter = 1;

if ($counter == 1)
{
  echo counter == 1;
  write_file $MYSQL_TMP_DIR/foo.inc;
blah 1
EOF
}

cat_file $MYSQL_TMP_DIR/foo.inc;
remove_file $MYSQL_TMP_DIR/foo.inc;

The above runs and produces the expected output. Now, change to let $counter = 2;

main.foo5                                [ fail ]
        Test ended at 2017-04-06 10:22:55

CURRENT_TEST: main.foo5
mysqltest: At line 13: Missing end of block
[6 Apr 2017 7:34] MySQL Verification Team
Hello Laurynas,

Thank you for the report.

Thanks,
Umesh
[25 Apr 2017 14:42] Paul DuBois
Posted by developer:
 
Fixed in 8.0.2.

Work was done for test suite. No changelog entry needed.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.