Hi. I'm programming in ESQL/C on Solaris for Informix 7.12. After my
"CONNECT" statement, I issue the statement "SET LOCK MODE TO WAIT", and
then my app does lots of "INSERT" operations. No problem when I run the
app alone.
But when I try to run multiple copies of my app concurrently, once in a
while the "INSERT" fails, returning SQLSTATE "IX000", SQLCODE -271
within a second of real time of when the "INSERT" was initiated. The
exception messages fetched are "Could not insert new row into the table"
and "ISAM error: key value locked".
I thought that if I set the lock mode to "WAIT" in my app, I would never
have a statement fail due to concurrent accesses/locks. Things might
hang a long time, but would eventually gain access to the table and
execute OK. If I try supplying an explicit time ("SET LOCK MODE TO WAIT
10", where the configuration file specify DEADLOCK_TIMEOUT as 60) the
"INSERT" statements that fail still fail with a second of their
initiation. Where am I going wrong? Thanks.
MLS