Bug #22339 Different behaviours with LOCK and UPDATE (Win/Linux)

Submitted: 14 Sep 2006 11:10 Modified: 19 Sep 2006 4:10
Reporter: Georg Richter Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.1.12-beta OS:Windows (Windows)
Assigned to: Assigned Account CPU Architecture:Any

[14 Sep 2006 11:10] Georg Richter
Description:
This bug is derived from multi_update.test, which fails on Win in 5.1

I have 2 Tables t1 and t2. Additionally a view v1 which selects from t1 and t2.

connection 1 locks table t1
connection 2 tries an update on t1, v1

Linux waits for releasing the lock
Windows returns an error. 

In 5.0, windows version also waits for lock.

How to repeat:
conn1:
create table t1 (a int, b int);
insert into t1 values (1, 2), (2, 3), (3, 4);
create table t2 (a int);
insert into t2 values (10), (20), (30);
create view v1 as select a as b, a/10 as a from t2;

conn2:
update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a;

returns error: ERROR 1100 (HY000): Table 't2' was not locked with LOCK TABLES
[19 Sep 2006 4:10] Iggy Galarza
This behaviour was introduced and fixed by changesets attached to bug#20789.  I tested the patch to make sure multi_update ran properly.

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

Page generated in 0.041 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.