Bug #58412 mysqltest: allow quoting of strings in if comparison
Submitted: 23 Nov 2010 9:47 Modified: 20 Dec 2010 3:08
Reporter: Bjørn Munch Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.5+ OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any

[23 Nov 2010 9:47] Bjørn Munch
Description:
Bug #57276 introduced a new if syntax, including comparing with strings.

In this syntax, strings should *not* be quoted. This runs counter to how people are used so specifying strings.

The parsing is used both in let assignments and in this compare. In both cases, it would make sense to allow strings to be optionally quoted in single or double quotes, which will then be stripped.

How to repeat:
N/A, syntax addition.
[23 Nov 2010 11:57] 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/124730

3118 Bjorn Munch	2010-11-23
      Bug #58412 mysqltest: allow quoting of strings in let and in if comparison
      Stripping quotes in let was a bad idea, will not fix
      Added code to strip quotes from rhs in comparisons
[23 Nov 2010 12:00] Bjørn Munch
I tried putting the quote stripping into eval_expr() but that was not a good idea. There are lots of tests that set a variable to some quoted string which then is used in some SQL, and they break if the quotes are removed.

Limited the stripping to if/while.
[26 Nov 2010 9:57] 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/125098

3120 Bjorn Munch	2010-11-26
      Bug #58412 mysqltest: allow quoting of strings in let and in if comparison
      Stripping quotes in let was a bad idea, will not fix
      Added code to strip quotes from rhs in comparisons
[26 Nov 2010 10:33] Bjørn Munch
Pushed to 5.5-mtr and trunk-mtr
[5 Dec 2010 12:39] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (version source revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (merge vers: 5.6.1) (pib:23)
[7 Dec 2010 12:53] Paul DuBois
Changes to test suite. No changelog entry needed.
[17 Dec 2010 12:51] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:georgi.kodinov@oracle.com-20101217124733-p1ivu6higouawv8l) (version source revid:bjorn.munch@oracle.com-20101127105217-ngg48wiwnfra2ik3) (merge vers: 5.5.8) (pib:24)