>>>>> "Dana" == Dana Powers <dana@stripped> writes:
Dana> I've found the answer to my problem in the bdb source...
>> From bdb/include/db.src:
Dana> #define DB_LOCK_DEADLOCK (-30996)/* Deadlock. */
Dana> So the question is: how can a bunch of simultaneous connections that only
Dana> work on 1 table create a deadlock. And how can I write my code to avoid this
Dana> Is this an intrinsic problem with BDB, a problem with the way mysql handles
Dana> BDB, or a problem with my application code?
As Heikki has explained, this is something that is typical for any
transactional table handler that uses locks.
(Many of the commercial table handlers uses locks).
The way around it is to detect this particular problem in the
application and retry the transaction if you get this error.
Dana> Additionaly, it would be nice if either the mysql engine returned a
Dana> string-ified version of the error code or if perror could handle these error
I have now created a unique error for this and also added this to
perror. I have also pushed this to the MySQL 3.23.43 source tree.