• Sergey Vojtovich's avatar
    MDEV-10824 - Crash in CREATE OR REPLACE TABLE t1 AS SELECT spfunc() · a3c980b3
    Sergey Vojtovich authored
    Code flow hit incorrect branch while closing table instances before removal.
    This branch expects thread to hold open table instance, whereas CREATE OR
    REPLACE doesn't actually hold open table instance.
    
    Before CREATE OR REPLACE TABLE it was impossible to hit this condition in
    LTM_PRELOCKED mode, thus the problem didn't expose itself during DROP TABLE
    or DROP DATABASE.
    
    Fixed by adjusting condition to take into account LTM_PRELOCKED mode, which can
    be set during CREATE OR REPLACE TABLE.
    a3c980b3
create_or_replace.result 13.5 KB