Bug #56753 mtr silently ignores junk after backticks
Submitted: 13 Sep 2010 16:01 Modified: 13 Nov 2010 16:11
Reporter: Sven Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S2 (Serious)
Version:5.1 OS:Any
Assigned to: Bjørn Munch
Tags: mtr
Triage: Needs Triage: D2 (Serious)

[13 Sep 2010 16:01] Sven Sandberg
Description:
mysqltest supports the following syntax for saving the result of a statement in a mysqltest variable:

  let $variable= `sql command`;

If the semicolon is omitted, whatever follows the backticks is silently ignored, up to the next semicolon. This can cause strange and hard-to-find problems if you make a typo and forget the semicolon. It would be better if mysqltest threw a syntax error when the semicolon is missing.

How to repeat:
let $x= `SELECT 1`
ley $y= 1;
echo $x;
[13 Sep 2010 16:17] Miguel Solorzano
Thank you for the bug report.
[15 Sep 2010 12:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/118305

2931 Bjorn Munch	2010-09-15
      Bug #56753 mtr silently ignores junk after backticks
      When stepping backward to end of `` expression, check for illegal chars
[20 Sep 2010 9:23] Bjørn Munch
Pushed to -mtr branches
[6 Oct 2010 19:42] Paul Dubois
Changes to test suite. No changelog entry needed.
[1 Nov 2010 18:59] Bugs System
Pushed into mysql-5.1 5.1.53 (revid:build@mysql.com-20101101184443-o2olipi8vkaxzsqk) (version source revid:build@mysql.com-20101101184443-o2olipi8vkaxzsqk) (merge vers: 5.1.53) (pib:21)
[9 Nov 2010 19:44] Bugs System
Pushed into mysql-5.5 5.5.7-rc (revid:sunanda.menon@sun.com-20101109182959-otkxq8vo2dcd13la) (version source revid:sunanda.menon@sun.com-20101109182959-otkxq8vo2dcd13la) (merge vers: 5.5.7-rc) (pib:21)
[13 Nov 2010 16:05] Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:alexander.nozdrin@oracle.com-20101113152450-2zzcm50e7i4j35v7) (merge vers: 5.6.1-m4) (pib:21)
[13 Nov 2010 16:31] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101113160336-atmtmfb3mzm4pz4i) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (pib:21)