Bug #57276 mysqltest: add support for simple compares in if/while conditions
Submitted: 6 Oct 2010 8:55 Modified: 6 Dec 2010 3:41
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

[6 Oct 2010 8:55] Bjørn Munch
Description:
if or while can only take a value as condition, even simple equality tests have so be done via a SELECT query. This is cumbersome. There have been requests to extend this.

The idea is to allow conditions like $var > 10 or $var == some text.

How to repeat:
N/A, just missing functionality.
[6 Oct 2010 9:15] 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/120073

3097 Bjorn Munch	2010-10-06
      Bug #57276 mysqltest: add support for simple compares in if/while conditions
      Added more parsing in do_block()
      Limitations: left operand must be variable, white space must surround operator
      Also changed var_set_int from 57036 to var_check_int
      Added tests to mysqltest.test
      Some tests can now be simplified but will take this later
[8 Nov 2010 14:15] 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/123087

3110 Bjorn Munch	2010-11-08
      Bug #57276 mysqltest: add support for simple compares in if/while conditions
      Added more parsing in do_block()
      Limitations: left operand must be variable, white space must surround operator
      Also changed var_set_int from 57036 to var_check_int
      Added tests to mysqltest.test
      Some tests can now be simplified but will take this later
      (This is a recommit of the first patch)
[10 Nov 2010 8:44] 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/123373

3110 Bjorn Munch	2010-11-10
      Bug #57276 mysqltest: add support for simple compares in if/while conditions
            Added more parsing in do_block()
            Limitation: left operand must be variable
            Also changed var_set_int from 57036 to var_check_int
            Added tests to mysqltest.test
            Some tests can now be simplified but will take this later
            Updated after comments, now white space around operator not needed
[10 Nov 2010 12:55] Bjørn Munch
Reviewer OK'ed on email after last patch.

Pushed to 5.5-mtr and trunk-mtr
[23 Nov 2010 20:32] Paul DuBois
Changes to test suite. No changelog entry needed.
[5 Dec 2010 12:40] 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)
[16 Dec 2010 22:30] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (version source revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (merge vers: 5.5.9) (pib:24)