Skip to content
  • Gleb Shchepa's avatar
    0b5894ce
    Bug #20087571: 5.7 EASILY HITS ERROR 1436 (HY000): THREAD STACK OVERRUN ERRORS ON MANY EXPR'S · 0b5894ce
    Gleb Shchepa authored
    This bug is a regression of WL7200: that WL introduced an unconditional
    recursive processing of AND and OR parse tree nodes during the
    contextualization, when the original parser had some conditional
    flattening of nested AND/OR expression.
    That affected very long recursive AND/OR expression: instead of the normal
    execution the parser failed with a parse error: ER_STACK_OVERRUN_NEED_MORE.
    
    This bugfix re-introduces an optimization that flattens recursive AND/OR
    expressions at parse time (before the itemization/contextualization):
    
     (X1 AND X2) AND (Y1 AND Y2) ==> AND (X1, X2, Y1, Y2)
     (X1 AND X2) AND Y ==> AND (X1, X2, Y)
     X AND (Y1 AND Y2) ==> AND (X, Y1, Y2)
    
    and the same for OR.
    0b5894ce
    Bug #20087571: 5.7 EASILY HITS ERROR 1436 (HY000): THREAD STACK OVERRUN ERRORS ON MANY EXPR'S
    Gleb Shchepa authored
    This bug is a regression of WL7200: that WL introduced an unconditional
    recursive processing of AND and OR parse tree nodes during the
    contextualization, when the original parser had some conditional
    flattening of nested AND/OR expression.
    That affected very long recursive AND/OR expression: instead of the normal
    execution the parser failed with a parse error: ER_STACK_OVERRUN_NEED_MORE.
    
    This bugfix re-introduces an optimization that flattens recursive AND/OR
    expressions at parse time (before the itemization/contextualization):
    
     (X1 AND X2) AND (Y1 AND Y2) ==> AND (X1, X2, Y1, Y2)
     (X1 AND X2) AND Y ==> AND (X1, X2, Y)
     X AND (Y1 AND Y2) ==> AND (X, Y1, Y2)
    
    and the same for OR.
Loading