perrin 2004/07/03 21:16:30 Modified: src/docs/1.0/guide databases.pod Log: Added note about issues with InnoDB tables and default isolation level Revision Changes Path 1.10 +22 -0 modperl-docs/src/docs/1.0/guide/databases.pod Index: databases.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/1.0/guide/databases.pod,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- databases.pod 9 May 2002 10:34:43 -0000 1.9 +++ databases.pod 4 Jul 2004 04:16:30 -0000 1.10 @@ -438,6 +438,28 @@ This can tie up the server and prevent other threads from updating the tables. +=head1 Transactions Not Committed with MySQL InnoDB Tables + +Sometimes, when using MySQL's InnoDB table type, you may notice that +changes you committed in one process don't seem to be visible to other +processes. You may not be aware that InnoDB tables use a default +approach to transactions that is actually more cautious than PostgreSQL +or Oracle's default. It's called "repeatable read", and the gist of +it is that you don't see updates made in other processes since your +last commit. There is an explanation of this here: +http://dev.mysql.com/doc/mysql/en/InnoDB_Consistent_read_example.html + +This is actually not directly related to mod_perl, but you wouldn't +notice this issue when using CGI because reconecting to the database on +each request resets things just as doing a commit does. It is the +persistent connections used with mod_perl that make this issue visible. + +If you suspect this is causing you problems, the simplest way to +deal with it is to change the isolation level to "read committed" -- +which is more like what PostgreSQL and Oracle do by default -- with +the "set transaction" command, described here: +http://dev.mysql.com/doc/mysql/en/InnoDB_transaction_isolation.html + =head1 Optimize: Run Two SQL Engine Servers Sometimes you end up running many databases on the same machine. These
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]