• gshchepa/uchum@gshchepa.localdomain's avatar
    Bug#5507: TRUNCATE does not work with views. · 4b2aab14
    gshchepa/uchum@gshchepa.localdomain authored
    Support of views wasn't implemented for the TRUNCATE statement.
    Now TRUNCATE on views has the same semantics as DELETE FROM view:
    mysql_truncate() checks whether the table is a view and falls back
    to delete if so.
    In order to initialize properly the LEX::updatable for a view
    st_lex::can_use_merged() now allows usage of merged views for the
    TRUNCATE statement.
    4b2aab14
sql_delete.cc 26.9 KB