• unknown's avatar
    Bug#22312 Syntax error in expression with INTERVAL() · cdc382e7
    unknown authored
    Parser rejects valid INTERVAL() expressions when associated with
    arithmetic operators. The problem is the way in which the expression
    and interval grammar rules were organized caused shift/reduce conflicts.
    
    The solution is to tweak the interval rules to avoid shift/reduce
    conflicts by removing the broken interval_expr rule and explicitly
    specify it's content where necessary.
    
    Original fix by Davi Arnaut, revised and improved rules by Marc Alff
    
    
    mysql-test/r/parser.result:
      Add test case result for Bug#22312
    mysql-test/t/parser.test:
      Add test case for Bug#22312
    sql/sql_yacc.yy:
      Resolve shift/reduce conflicts by reorganizing the interval
      expression rules.
    cdc382e7
parser.result 30.4 KB