Wei,
the intention lock is required: always when InnoDB sets an S-lock on a
record, there must be an IS-lock on the table.
Please file an InnoDB bug report to http://bugs.mysql.com
Please describe precisely how you compiled mysqld. Please show the
output from the crash.
Best regards,
Heikki
###################
List: MySQL Internals
From: Wei Li Date: December 6 2006 12:26am
Subject: Re: InnoDB: lock_clust_rec_read_check_and_lock()
Get Plain Text
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@stripped> 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
>