AntiSpam - mysql, sql, query

Version: 3.23.49a, MyISAM, NT, Solaris

My app is 150 daemons writing logs to mysql. The main 
table is of fixed size but depends on four other tables
for foreign keys (hash tables). These tables are uploaded
once to the daemon at start-up. Occasionally, a new entry 
must be written into these hash tables. The procedure is
to lock the table, insert entry, get the key (auto-increment
field) and release the lock.

But what if the connection dies during the update process.
If this happens, how can I tell which connection id has the 
lock so I can kill it? 

I have tried:
  show full processlist - shows connection id's - no lock info
  show table status;    - will not display until lock is removed
  show open tables      - shows open table with comment in_use=1
                          but this could be normal operation.

My understanding is that the lock will be removed once the
connection dies (sql command "kill id" or the server terminates
connection via timeout). I would to detect when the lock is
on for a long period of time.

Any ideas? Suggestions?

David
---
David E Lopez
Org:   SPS->ASP->SOC ATIC->CSAM
Phone: 480-413-6251
email: [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to