• Aditya A's avatar
    Bug#11751825 - OPTIMIZE PARTITION RECREATES FULL TABLE INSTEAD JUST PARTITION · cdf5f453
    Aditya A authored
    PROBLEM 
    -------
    
    optimize on partiton will recreate the whole table 
    instead of just partition.
    
    ANALYSIS
    --------
    
    At present innodb doesn't support optimize option ,so we do a rebuild of the 
    whole table and then call analyze() on the table.Presently for any optimize()
    option (on table or partition) we display the following info to the user 
    
    "Table does not support optimize, doing recreate + analyze instead".
    
    FIX
    ---
    
    It was decided for GA versions(5.1 and 5.5) whenever the user tries to 
    optimize a partition(s) we will will display the following info the user
    
    "Table does not support optimize on partitions.
    All partitions will be rebuilt and analyzed."
    
    Earlier partitions were not analyzed.Now all partitions  will be analyzed.  
    
    If the user wants to optimize the whole table ,we will display the
    previous info to the user. i.e
    
    "Table does not support optimize, doing recreate + analyze instead"
    
    For 5.6+ versions we will raise a new bug to support optimize() options
    in innodb.
    cdf5f453
sql_table.cc 257 KB