• Oleksandr Byelkin's avatar
    Bug#29363867: LOST CONNECTION TO MYSQL SERVER DURING QUERY · 24693c6f
    Oleksandr Byelkin authored
    The problem is that sharing default expression among set instruction
    leads to attempt access result field of function created in
    other instruction runtime MEM_ROOT and already freed
    (a bit different then MySQL problem).
    
    Fix is the same as in MySQL (but no optimisation for constant), turn
    DECLARE a, b, c type DEFAULT expr;
    to
    DECLARE a type DEFAULT expr, b type DEFAULT a, c type DEFAULT a;
    24693c6f
sql_yacc.yy 518 KB