RE: table locking with forking

John Trammell <[email protected]> Wed, 19 Sep 2007 11:19:42 -0500
Newsgroups gmane.comp.db.mysql.perl
Message-ID <1EEA8FAEE559BE49B397E42A3D42A5A70BA334CBA9@floyd.universe.holmescorp.com>
> -----Original Message-----
> From: Jeremy Kister [mailto:[email protected]]
> Sent: Tuesday, September 18, 2007 11:44 PM
> To: [email protected]
> Subject: table locking with forking
>
> I'm having issues with locking and forking code.  I've consolidated the
> problem into the below example code.

I played around with this, and came up with the attached code.  The key was using InnoDB with commit() in the right place.

I don't understand the behavior of the original script; it looks like the INSERT from the child process gets queued up by MySQL, and the killing of the child doesn't affect it.


-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]