I am stumped by a table lock issue. First, some details.

I am running MySQL 5.0.22 on an AMD 64 machine.

mysqld -V outputs:

/usr/local/libexec/mysqld Ver 5.0.22-debug-log for unknown-linux-gnu on x86_64 (Source distribution)

uname -a:
2.6.8-11-amd64-generic #1 Wed Jun 1 00:42:47 CEST 2005 x86_64 GNU/Linux


I compiled MySQL as follows ( from the docs ):

CC=gcc CFLAGS="-O2" CXX=gcc CXXFLAGS="-O2 -felide-constructors \
   -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql \
   --with-debug --with-extra-charsets=complex


The problem I am having is the following:

Randomly, on any DB or table within, a lock will remain in place after an insert. The insert could be something very simple, but it will fail to unlock the table. Following this failure, any other query that needs to lock the table afterwards ( updates/inserts ) will fail and will queue up - visible when doing a show full processlist. Killing the PID of that particular INSERT doesn't do anything. In fact, the only way to kill it and unlock the table is to do a kill -9 on the mysqld process.

This is what it looks like from within mysql:

| 448 | root | localhost | shopDani | Query | 233 | update | insert into items set custID='XXXXX',item='yyyyy',qty='1' |

I am not sure from where to start tackling this issue and my first step was to recompile MySQL with debug support. I then managed to catch it happening in the debug log but I'm afraid it's not offering more details:


do_command: info: Command on socket (47) = 3 (Query)
dispatch_command: query: insert into items set custID='XXXXXX',item='yyyy',qty='1'
thr_lock: info: write_wait.data: 0x0
thr_lock: info: dellink: -1  r_locks: 0  w_locks: 1
mi_get_status: info: key_file: 311296  data_file: 217356  concurrent_insert: 1
unique_table: info: real table: store.items
mysql_lock_have_duplicate: info: no duplicate found
ha_myisam::start_bulk_insert: info: start_bulk_insert: rows 1 size 0
do_command: info: Command on socket (72) = 1 (Quit)


There is more data but I thought only this was relevant to this particular insert.

If anyone has any suggestions or clues, feel free to write back.

Thank you,
George




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to