Patricio, ----- Original Message ----- From: "Patricio Díaz G." <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Monday, December 16, 2002 12:35 AM Subject: InnoDB table lock status
> I'am working with MySQL 3.23.51-Max in a linux box and Visual Fox and Delphi > in a WinXP box, mostly using InnoDB tables. > > Is there a way to know wich rows are lockedin a table? is there a function > that returns if a row is locked, or the rows locked in a table? It can be > done with a UDF? > > My question is due that, as you know, the InnoDB tables makes loking at row > level and in the context of a transaction, so if someone has locked the row > that I'm tring to read or lock, my program freezes until the rows are > released. > > I worked arround this situation setting the value of > innodb_lock_wait_timeout to 5, more or less, so my program doesn't freezes > and a warnig is raised, then I can "assume" that the row is locked, but > can't be sure that this is the real reason of the warnig. I already replied to your question on Friday, but I repeat it here: SHOW LOCK STATUS is in the TODO, and I consider it an important feature. Currently the only way to get lock info is to use innodb_lock_monitor, but it prints the info to the .err log. There is no SQL query to determine if a row is locked or not. Also SELECT ... FOR UPDATE NOWAIT is in the TODO. That is an SQL query which could be used to determine if a row is locked or not. It would not acquire the lock if it cannot get it immediately. > Thanks in advance, > Patricio. Best regards, Heikki Tuuri Innobase Oy --- Order technical MySQL/InnoDB support at https://order.mysql.com/ See http://www.innodb.com for the online manual and latest news on InnoDB sql query --------------------------------------------------------------------- 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