Commit fe7d8b5a authored by marko's avatar marko

branches/5.1: ha_innobase::delete_all_rows(): In response to a user asking

<http://forums.innodb.com/read.php?4,215,215> why DELETE FROM t is not
mapped to TRUNCATE TABLE t as it is in MyISAM, note in a comment that
DELETE is transactional while TRUNCATE is not.
parent bc0cfbd3
...@@ -5335,7 +5335,8 @@ ha_innobase::delete_all_rows(void) ...@@ -5335,7 +5335,8 @@ ha_innobase::delete_all_rows(void)
if (thd_sql_command(user_thd) != SQLCOM_TRUNCATE) { if (thd_sql_command(user_thd) != SQLCOM_TRUNCATE) {
fallback: fallback:
/* We only handle TRUNCATE TABLE t as a special case. /* We only handle TRUNCATE TABLE t as a special case.
DELETE FROM t will have to use ha_innobase::delete_row(). */ DELETE FROM t will have to use ha_innobase::delete_row(),
because DELETE is transactional while TRUNCATE is not. */
DBUG_RETURN(my_errno=HA_ERR_WRONG_COMMAND); DBUG_RETURN(my_errno=HA_ERR_WRONG_COMMAND);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment