[MDEV-256] LP:995501 - mysqltest attempts to parse Perl code inside a block with false condition, gets confused and throws wrong errors Created: 2012-05-06 Updated: 2012-06-02 Resolved: 2012-06-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.22, 5.3.6, 5.2.11, 5.1.61 |
| Fix Version/s: | 5.5.25, 5.3.8, 5.2.13, 5.1.66 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | tests, upstream | ||
| Description |
|
https://bugs.launchpad.net/maria/+bug/995501 The following test case
fails with
Reproducible on MariaDB 5.1-5.5, MySQL 5.1-5.6. The problem, how I understand it from a quick look, is that mysqltest attempts to parse the code even inside --perl / EOF block; but it fails because it doesn't expect any 'foreach'es or other ways to start a block except for 'if' or 'while'; so it does not notice a start of the inner block, and the rest of parsing goes all wrong. It only happens when the outer block is not to be executed. For example, this works all right:
The right approach seems to be totally ignore everything from the beginning of a perl block and till its eof string. Sorry for not providing a patch so far, during the brief investigation I didn't notice an obvious way to fix it, it would require deeper digging from The problem is a bit of pain for writing reasonably complicated test cases, but so far it seems I can work around it, so I'm setting importance to 'Minor' for now. |
| Comments |
| Comment by Sergei Golubchik [ 2012-06-02 ] |
|
fixed. pushed in 5.1 and 5.2 |