• unknown's avatar
    BUG#29130 (The logic for using delete_all_rows() is wrong): · 02377506
    unknown authored
    Correcting the logic for deciding when to use delete_all_rows() so that
    the behavior of TRUNCATE to not be dependent on binary logging
    format in effect.
    
    A TRUNCATE statement is always logged as a statement, so in this case,
    delete_all_rows() can always be used provided the other logic is correct.
    If a DELETE FROM without a WHERE clause is used, and row-based binlogging
    is used, the rows has to be deleted from the table on a per-row basis.
    
    
    sql/sql_delete.cc:
      The logic for deciding when to use delete_all_rows() was altered so that
      the format used for binary logging does not affect how TRUNCATE is
      handled.
    02377506
sql_delete.cc 29.9 KB