Dear Heikki,
I did a search on your name in the lists.mysql.com, but none of your
posts there answer my question directly.
I could deduce from one thread that it was not possible (the post was
about the person wanting to set the wait time to 0 in order to solve
the problem) but then again his problem was not exactly the same
problem I'm having.
So I'm still wondering, is it possible to "detect" a lock before
attempting an update? Or is the only way to find out whether the
update will be performed by attempting the update and hoping for the
best? This last solution seems very crude to me, is there really not
another option/solution?
Thanks for any help, Jonck
"Heikki Tuuri" <He**********@innodb.com> wrote in message news:<3U***************@read3.inet.fi>...
Please look at my reply from http://lists.mysql.com/
"Jonck van der Kogel" <jo***@vanderkogel.net> kirjoitti viestissä
news:28**************************@posting.google.c om... Hi everybody,
I am having a hard time finding any info on this subject, so I was
hoping maybe one of you could give me some pointers.
I am writing an application in Java that uses Connector/J to interface
with a MySQL database with InnoDB tables. When user #1 opens a certain
recordset I am locking this recordset in share mode. Therefore if user
#2 selects the same recordset (and thus placing a lock as well) user
#1 will not be able to update the recordset.
Is there a way to detect this, and thus making it possible to inform
user #1 that an update is currently not possible due to another lock?
Thanks very much for any help, Jonck