• Ajo Robert's avatar
    Bug#19817021 CRASH IN TABLE_LIST::PREPARE_SECURITY WHEN · 15de3c62
    Ajo Robert authored
    DOING BAD DDL IN PREPARED STATEMENT
    
    Analysis
    ========
    A repeat execution of the prepared statement 'ALTER TABLE v1
    CHECK PARTITION' where v1 is a view leads to server exit.
    
    ALTER TABLE ... CHECK PARTITION is not applicable for views
    and check for the same check is missing. This leads to
    further execution and creation of derived table for the view
    (Allocated under temp_table mem_root). Any reference to open
     view or related pointers from second execution leads to
    server exit as the same was freed at previous execution closure.
    
    Fix:
    ======
    Added check for view in mysql_admin_table() on PARTITION
    operation. This will prevent mysql_admin_table() from
    going ahead and creating temp table and related issues.
    Changed message on admin table view operation error to
    be more appropriate.
    15de3c62
sp.result 186 KB