← Back to team overview

randgen team mailing list archive

[Bug 791783] Re: MTR testcase creation fails for MIN()/MAX() functions

 

No problem. Feel free to remove and/or fix the regexp. You can also
pretty-print the test cases manually when you file them, depending on
the requirements of your developers.

-- 
You received this bug notification because you are a member of Random
Query Generator Team, which is subscribed to Random Query Generator.
https://bugs.launchpad.net/bugs/791783

Title:
  MTR testcase creation fails for MIN()/MAX() functions

Status in SQL Generator for testing SQL servers (MySQL, JavaDB, PostgreSQL):
  New

Bug description:
  MTR testcases containing the following code (using standard optimizer
  grammars) are created:

  SELECT
  (
  SELECT MIN
  ( SUBQUERY1_t1.col_int_key )
  FROM t3 AS SUBQUERY1_t1 STRAIGHT_JOIN
  ( t2 AS SUBQUERY1_t2 JOIN t1 AS SUBQUERY1_t3 ON SUBQUERY1_t3.col_int_key = SUBQUERY1_t2.pk )
  ON SUBQUERY1_t3.col_varchar_key = SUBQUERY1_t2.col_varchar_key
  WHERE SUBQUERY1_t2.col_varchar_key <> table1.col_varchar_nokey )
  FROM t1 AS table1
  RIGHT JOIN
  (
  SELECT *
  FROM t3 )
  AS table2 JOIN t1 AS table3 ON table3.col_varchar_key = table2.col_varchar_key ON table3.col_varchar_nokey = table2.col_varchar_key 

  This fails with:

  1630: FUNCTION test.MIN does not exist. Check the 'Function Name
  Parsing and Resolution' section in the Reference Manual

  Changing this:

  SELECT MIN
  ( SUBQUERY1_t1.col_int_key )

  to:

  SELECT MIN(SUBQUERY1_t1.col_int_key)

  Resolves the issue.


References