From: Date: October 24 2005 10:27pm Subject: bk commit into 5.0 tree (sergefp:1.2022) BUG#11704 List-Archive: http://lists.mysql.com/internals/31403 X-Bug: 11704 Message-Id: <20051024202721.BD74F37B08@newbox.mylan> Below is the list of changes that have just been committed into a local 5.0 repository of psergey. When psergey does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2022 05/10/25 00:27:15 sergefp@stripped +1 -0 BUG#11704: Make InnoDB not to convert TL_WRITE_ONLY locks to TL_WRITE_ALLOW_WRITE in OPTIMIZE TABLE. sql/ha_innodb.cc 1.274 05/10/25 00:27:04 sergefp@stripped +1 -0 Fix for BUG#11704: "Found locks from different thread" warnings: The source of warnings was this scenario in OPTIMIZE: thr1: lock table with TL_WRITE_ONLY (InnoDB converts lock to TL_WRITE_ALLOW_WRITE) thr2: (UPDATE command) obtains a TL_WRITE_ALLOW_WRITE lock thr1: call mysql_lock_abort(). This function sets type of thr'1 lock to TL_WRITE_ONLY thr2: try to release thr2's lock. See two locks: TL_WRITE_ONLY, TL_WRITE_ALLOW_WRITE and produce a warning. The fix: Make InnoDB not to convert TL_WRITE_ONLY locks to TL_WRITE_ALLOW_WRITE in OPTIMIZE TABLE. # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: sergefp # Host: newbox.mylan # Root: /home/psergey/mysql-5.0-bug11704-r4 --- 1.273/sql/ha_innodb.cc 2005-10-19 20:06:22 +04:00 +++ 1.274/sql/ha_innodb.cc 2005-10-25 00:27:04 +04:00 @@ -6811,6 +6811,7 @@ || thd->lex->sql_command == SQLCOM_CALL) && !thd->tablespace_op && thd->lex->sql_command != SQLCOM_TRUNCATE + && thd->lex->sql_command != SQLCOM_OPTIMIZE && thd->lex->sql_command != SQLCOM_CREATE_TABLE) { lock_type = TL_WRITE_ALLOW_WRITE;