From: Ole John Aske Date: November 12 2010 8:27am Subject: bzr push into mysql-5.1-telco-7.0-spj-scan-vs-scan branch (ole.john.aske:3361 to 3362) List-Archive: http://lists.mysql.com/commits/123689 Message-Id: <20101112082703.EC04C222@fimafeng09.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3362 Ole John Aske 2010-11-12 spj-svs: Extended RQG grammer to provide better testcoverage of subqueries: - Reeneabled in which was disabled for some reason ....? - Extended in to also cover char expressions. - Defined 'quantified comparison predicate' (ALL, ANY subquery) modified: storage/ndb/test/rqg/spj_test.yy 3361 Ole John Aske 2010-11-11 spj-svs: Remove dead code which accidentially was included in my prev. commit :-/ modified: sql/abstract_query_plan.cc === modified file 'storage/ndb/test/rqg/spj_test.yy' --- a/storage/ndb/test/rqg/spj_test.yy 2010-10-11 12:16:22 +0000 +++ b/storage/ndb/test/rqg/spj_test.yy 2010-11-12 08:14:52 +0000 @@ -543,13 +543,29 @@ corresponding_spec: ######################################### int_scalar_subquery: + int_subquery_1row + ; + +char_scalar_subquery: + char_subquery_1row + ; + +int_table_subquery: + int_subquery_1row + ; + +char_table_subquery: + char_subquery_1row + ; + +int_subquery_1row: subqry_enter (SELECT lookahead_for_table_alias distinct straight_join select_option int_select_item table_expr) subqry_leave ; -char_scalar_subquery: +char_subquery_1row: subqry_enter (SELECT lookahead_for_table_alias distinct straight_join select_option char_select_item table_expr) @@ -649,15 +665,23 @@ other_predicate: | value_expr IS not NULL | int_value_expr not BETWEEN int_value_expr AND int_value_expr | char_value_expr not LIKE {"'%".$prng->string(3)."%'"} - | int_value_expr not IN (number_list) -#| int_value_expr not IN int_scalar_subquery | EXISTS table_subquery + | int_value_expr not IN (number_list) + | int_value_expr not IN int_table_subquery + | char_value_expr not IN char_table_subquery + | int_value_expr comparison_operator quantifier int_table_subquery + | char_value_expr comparison_operator quantifier char_table_subquery +#| UNIQUE table_subquery # MySql unsupported ; number_list: _digit | number_list, _digit ; +quantifier: + ALL | ANY + ; + ################################################################################ # We use the total_order_by rule when using the LIMIT operator to ensure that # # we have a consistent result set - server1 and server2 should not differ # No bundle (reason: useless for push emails).