• Alexander Barkov's avatar
    MDEV-10080 Derived tables allow double LIMIT clause · f6a7c1c7
    Alexander Barkov authored
    1. Moving the "| get_select_lex_derived select_derived_init" part of
    select_derived into a separate new rule derived_query_specification.
    2. Using derived_query_specification directly in select_derived_union
    rather than in select_derived.
    3. Moving the sequence "opt_order_clause opt_limit_clause opt_select_lock_type"
    from select_derived2 to select_derived_union,
    after derived_query_specification.
    
    Effectively, the parser now does not go through the sequence
    "opt_order_clause opt_limit_clause ... opt_union_order_or_limit" any more.
    
    This fixes the problem with double LIMIT clause and removes 2 shift/reduce
    conflicts.
    f6a7c1c7
parser.test 26.1 KB