# How to disable implicit commit

**URL:** <https://forums.percona.com/t/how-to-disable-implicit-commit/1407>\
**Category:** Other MySQL® Questions\
**Created:** [May 14, 2010, 6:33am UTC](https://forums.percona.com/t/how-to-disable-implicit-commit/1407 "2010-05-14T06:33:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krteq](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@krteq](https://forums.percona.com/u/krteq)\
**Post date:** [May 14, 2010, 6:33am UTC](https://forums.percona.com/t/how-to-disable-implicit-commit/1407/1 "2010-05-14T06:33:25Z")

</div>

Is there any way to disable implicit COMMIT in case of statements like START TRANSACTION, CREATE TABLE etc?

[URL][http://dev.mysql.com/doc/refman/5.1/en/implicit-commit.html[/URL]](http://dev.mysql.com/doc/refman/5.1/en/implicit-commit.html%5B/URL%5D)

It would be very useful for catching hidden application bugs - I never want to commit a transaction if I haven’t run COMMIT statement.

And another question, is there any session status variable, which indicates an open transaction?

Thank you, Vojtech

---

<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:** [May 14, 2010, 10:10am UTC](https://forums.percona.com/t/how-to-disable-implicit-commit/1407/2 "2010-05-14T10:10:06Z")

</div>

No, and no. The second one is odd, because the protocol and the session actually know that there’s an open transaction – it just isn’t exposed to the user.

---

<div class="post-metadata">

**Author:** ![krteq](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@krteq](https://forums.percona.com/u/krteq)\
**Post date:** [May 14, 2010, 10:27am UTC](https://forums.percona.com/t/how-to-disable-implicit-commit/1407/3 "2010-05-14T10:27:54Z")

</div>

Thats really odd ( Thank you Baron, I’ll try to simulate it in our acpplication database layer.
