And that's about it for the moment. Over the last few pages, I introduced you to transactions in MySQL, explaining the theory behind the transactional model and showing you how to implement a transactional environment with MySQL's InnoDB tables. I also demonstrated one of MySQL's quirks - automatic COMMITs and ROLLBACKs in particular situations - and showed you how to control automatic commits with the AUTOCOMMIT variable.
In the second part of this article, I'll be exploring the MySQL transactional model in a multi-user scenario, illustrating some of the data corruption problems that raise their ugly heads in this environment and showing you how you can use MySQL's isolation levels to reduce their likelihood. I'll also show you how to leverage off the transaction model to build more robust SQL applications, with a sample Perl/DBI application, and explain how to use transactions with non-transactional MyISAM tables. All that and more, next time...so make sure you come back!
Note: All examples in this article have been tested on MySQL 4.0.14. Examples are illustrative only, and are not meant for a production environment. Neither Melonfire nor DevShed provide warranties or support for the source code described in this article.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |