~elenst/randgen/mariadb-patches

« back to all changes in this revision

Viewing changes to conf/mariadb/optimizer.yy

  • Committer: elenst at gmail
  • Date: 2016-03-19 13:40:32 UTC
  • Revision ID: elenst@gmail.com-20160319134032-vbczdr1erkh6nzkn
Added some ORDER BY, but currently disabled due to MDEV-9513, MDEV-9514

Show diffs side-by-side

added added

removed removed

Lines of Context:
300
300
        ( SELECT _digit FROM DUAL ) ;
301
301
 
302
302
int_single_union_subquery:
303
 
        (  SELECT _digit  UNION all_distinct  SELECT _digit  )  ;
 
303
        ( SELECT _digit UNION all_distinct SELECT _digit order_by_union_sq ) ;
304
304
 
305
305
int_single_union_subquery_disabled:
306
306
        int_single_member_subquery   UNION all_distinct  int_single_member_subquery ;
328
328
          subquery_having ) |
329
329
        (  SELECT _digit , _digit  UNION all_distinct  SELECT _digit, _digit  ) ;
330
330
 
 
331
order_by_union_sq:
 
332
        | order_by_anon ;
 
333
 
331
334
char_single_member_subquery:
332
335
        ( SELECT distinct select_option subquery_table_one_two . _field_char AS { $sq_cfields = 1; "SQ".$subquery_idx."_cfield1" }
333
336
         subquery_body
335
338
         subquery_having) ;
336
339
 
337
340
char_single_union_subquery:
338
 
        (  SELECT _char  UNION all_distinct  SELECT _char  )  ;
 
341
        ( SELECT _char UNION all_distinct SELECT _char order_by_union_sq ) ;
339
342
 
340
343
char_single_union_subquery_disabled:
341
344
        char_single_member_subquery   UNION all_distinct char_single_member_subquery  ;
750
753
order_by_clause:
751
754
        |
752
755
        ORDER BY total_order_by limit |
753
 
        ORDER BY partial_order_by;
 
756
        ORDER BY partial_order_by |
 
757
        order_by_anon;
 
758
 
 
759
# TODO: Uncomment after MDEV-9513 and MDEV-9514 are fixed
 
760
order_by_anon:
 
761
#       ORDER BY 1 | ORDER BY 2 | ORDER BY 2, 1 | ORDER BY RAND();
 
762
#       ORDER BY 1 | ORDER BY RAND()
 
763
;
754
764
 
755
765
partial_order_by:
756
766
   { join(', ', (shuffle ( (map { "field".$_ } 1..$fields), (map { "ifield".$_ } 1..$ifields), (map { "cfield".$_ } 1..$cfields) ))[0..int(rand($fields+$ifields+$cfields))] ) };