502_Geek
502_Geek

Reputation: 2126

Commit and Rollback not work in Mysql's MyISAM

When I testing some mysql commit and rollback procedure, I found some problems about commit and rollback at MyISAM Engine. Can commit or rollback not working on MyISAM Engine? May I know different between InnoDB and MyISAM Engine.

Upvotes: 3

Views: 6727

Answers (4)

Code Lღver
Code Lღver

Reputation: 15603

MyIASM does not support the rollback and commit, you need to use the InnoDB for that.

Difference between Innodb and MyISAM:

First major difference I see is that InnoDB implements row-level lock while MyISAM can do only a table-level lock. You will find better crash recovery in InnoDB. However, it doesn't have FULLTEXT search indexes, as does MyISAM. InnoDB also implements transactions, foreign keys and relationship constraints while MyISAM does not.

The list can go a bit further. Yet, they both have their unique advantages in their favor and disadvantages against each other. Each of them is more suitable in some scenarios than the other.

So to summarize:

  • InnoDB has row-level locking, MyISAM can only do full table-level locking.
  • InnoDB has better crash recovery.
  • MyISAM has FULLTEXT search indexes, InnoDB doesn't.
  • InnoDB implements transactions, foreign keys and relationship constraints, MyISAM does not.

Upvotes: 14

Yograj kingaonkar
Yograj kingaonkar

Reputation: 11

InnoDB implements transactions. MyISAM does not. MyISAM is auto-commit.

Upvotes: 1

Will Brannon
Will Brannon

Reputation: 91

MyISAM doesn't support real transactions (as if everything were run with autocommit enabled):

http://dev.mysql.com/doc/refman/5.7/en/ansi-diff-transactions.html

Upvotes: 3

jaczes
jaczes

Reputation: 1394

First answer in google... "commit or rollback not working on MyISAM"

http://forums.mysql.com/read.php?21,68686,68701#msg-68701

Sometimes Users should make an effort to search for sth than writing.

Upvotes: 1

Related Questions