[KLUG Members] mysql and locking reads
Jamie McCarthy
members@kalamazoolinux.org
Wed, 25 Feb 2004 14:34:17 -0500
bartleyd2@chartermi.net (Dirk H Bartley) writes:
> In the programming I'm used to if you lock and then end the
> program, the release automatically occurs.
Yep, in MySQL, if your connection goes away, any locks are released
(and any uncommitted inserts/updates are rolled back). If the
client process dies horribly (kill -9 or something), I would guess
the locks would persist until the connection timed out on the server
side, not sure about that.
> Would the lock remain until some sort of timeout?? or forever,
> which is a mighty long time.
I see in my conf file the default "innodb_lock_wait_timeout" is
50 seconds, so you can adjust that as you see fit :)
--
Jamie McCarthy
http://mccarthy.vg/
jamie@mccarthy.vg