artem wrote:

please clarify use of set autocommit


Here's an unsolicited opinion: AVOID using autocommit within applications. Based on my experiences with other DBMSs, it's a very likely source of hard-to-find program bugs. The problem occurs when it's turned on and off in a program -- it's very easy to forget what the current state is, and if a programmer should be wrong, a disaster will ensue.

If the programmer expects it to be on, but it is actually off, the programmer will not issue COMMITs. In other DBMSs which I am familiar with, this will cause the transaction log file to continually grow, eventually run out of space, and result in all information in the giant unintentional transaction being rolled back, with little information on this sent back to the program. Not pretty.

If the programmer expects it to be off, but it is actually on, the programmer will issue COMMITs which succeed, and think that they're doing transaction processing... but they aren't. Attempted ROLLBACKs will appear to work, but will do *nothing*. Also not pretty... this one leads to corrupt data.

I assume that MySQL will behave similarly, but I don't have enough experience to be sure.

Bruce Feist



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to