# Deleting data and the undo log

**URL:** <https://forums.percona.com/t/deleting-data-and-the-undo-log/1719>\
**Category:** Other MySQL® Questions\
**Created:** [December 2, 2011, 9:45am UTC](https://forums.percona.com/t/deleting-data-and-the-undo-log/1719 "2011-12-02T09:45:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerozebo](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@kerozebo](https://forums.percona.com/u/kerozebo)\
**Post date:** [December 2, 2011, 9:45am UTC](https://forums.percona.com/t/deleting-data-and-the-undo-log/1719/1 "2011-12-02T09:45:39Z")

</div>

Does “drop table” use the undo log (rollback segment) to temporarily store records to be purged later, the way “delete from table” does?

---

<div class="post-metadata">

**Author:** ![gmouse](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gmouse](https://forums.percona.com/u/gmouse)\
**Post date:** [December 2, 2011, 10:01am UTC](https://forums.percona.com/t/deleting-data-and-the-undo-log/1719/2 "2011-12-02T10:01:53Z")

</div>

Drop table cannot be undone, so I expect the answer to be negative.

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [December 4, 2011, 6:36am UTC](https://forums.percona.com/t/deleting-data-and-the-undo-log/1719/3 "2011-12-04T06:36:12Z")

</div>

I don’t think it does, but I am not sure.

---

<div class="post-metadata">

**Author:** ![sterin71](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@sterin71](https://forums.percona.com/u/sterin71)\
**Post date:** [December 5, 2011, 3:46pm UTC](https://forums.percona.com/t/deleting-data-and-the-undo-log/1719/4 "2011-12-05T15:46:38Z")

</div>

Dito! 🙂

Since drop table is a DDL statement that:

1. can’t be part of a transaction and
2. can’t be undone

I would say it’s highly unlikely that it uses the undo log for anything.

There are some interesting reading in the manual for the related statement TRUNCATE TABLE (which basically is like a DROP TABLE; CREATE TABLE combination) and hence is not related to normal DML statements that can be part of a transaction and in need of the undo log.

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [December 6, 2011, 3:04pm UTC](https://forums.percona.com/t/deleting-data-and-the-undo-log/1719/5 "2011-12-06T15:04:26Z")

</div>

Inside InnoDB, absolutely everything is fully ACID. The non-transactinoality of DROP and other DDL is due to the MySQL layer outside of InnoDB.
