Bug #24910 IS lock debug assert in lock_clust_rec_read_check_and_lock()

Submitted: 8 Dec 2006 13:46 Modified: 8 Dec 2006 18:10
Reporter: Heikki Tuuri Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:4.1.21 OS:
Assigned to: Assigned Account CPU Architecture:Any

[8 Dec 2006 13:46] Heikki Tuuri
Description:
Reported at http://lists.mysql.com/internals/34164

How to repeat:
More information about the crash:
   . it can be reproduced on 4.1.21 with debug build
   . --default-storage-engine=innodb and 
--transaction-isolation=READ-COMMITTED
     need to be set on the slave side for rpl00001 to reproduce the crash
   . it fails in "insert into t3 select get_lock('crash_lock%20C', 1)
from t2" when it expects
     IS lock should be held on the row in table t2

Thanks,
Wei

On 12/5/06, Wei Li <wei@google.com> wrote:
 > Hi,
 >
 > I wonder whether the intention lock check in
 > lock_clust_rec_read_check_and_lock() is really needed:
 >
 > 
--------------------------------------------------------------------------------------------------
 >         ut_ad(mode != LOCK_X
 >               || lock_table_has(thr_get_trx(thr), index->table, 
LOCK_IX));
 >         ut_ad(mode != LOCK_S
 >               || lock_table_has(thr_get_trx(thr), index->table, 
LOCK_IS));
 >
 >         if (!page_rec_is_supremum(rec)) {
 >
 >                 lock_rec_convert_impl_to_expl(rec, index);
 >         }
 >
 > 
---------------------------------------------------------------------------------------------------
 >
 > If I enable innodb and read commited mode in the slave, mysql test
 > rpl000001 crashes in
 > debug model.  But, it works fine in optimized mode.
 >
 > Thanks,
 > Wei
 >

Suggested fix:
N/A
[8 Dec 2006 18:10] Heikki Tuuri
Duplicate of 24919.
[8 Dec 2006 19:34] Wei Li
You need to change mysql-run-test a little:
-           --skip-innodb --skip-ndbcluster --skip-slave-start \
+          --default-storage-engine=innodb --transaction-isolation=READ-COMMITTED
to reproduce it.

InnoDB need read lock because binlog is enabled.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.