• andrey@example.com's avatar
    Cleanup patch for handling of subselects in commands which cannot · 0a9b523e
    andrey@example.com authored
    handle them.
    
    Problem:
    CREATE|ALTER EVENT, HANDLER READ, KILL, Partitioning uses `expr` from the
    parser. This rule comes with all the rings and bells including subqueries.
    However, these commands are not subquery safe. For this reason there are two
    fuse checks in the parser. They were checking by command id. CREATE EVENT
    should forbid subquery is the fix for
    bug#16394 Events: Crash if schedule contains SELECT
    The fix has been incorporated as part of the patch for WL#3337 (Event scheduler
    new architecture).
    
    Solution:
    A new flag was added to LEX command_forbids_subselect. The fuse checks were
    changed. The commands are responsible to set the value to true whenever
    they can't handle subselects.
    0a9b523e
sql_lex.h 39.6 KB