Bug #26871 Falcon: SELECT ... FOR UPDATE results in wrong error message
Submitted: 6 Mar 2007 11:40 Modified: 23 Mar 2007 8:06
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S2 (Serious)
Version:5.2.4-falcon-alpha-debug OS:Any
Assigned to: Jim Starkey CPU Architecture:Any

[6 Mar 2007 11:40] Hakan Küçükyılmaz
Description:
SELECT ... FOR UPDATE results in:

1020: Record has changed since last read in table 't1'

How to repeat:
I use two connections both running with autocommit = 0 and isolation level of READ-COMMITTED.

On the first connection I lock a record like
> SELECT a FROM t1 WHERE a = 1 FOR UPDATE;

I switch to second connection where I issue the same request for locking the same row
> SELECT a FROM t1 WHERE a = 1 FOR UPDATE;

The second connection is blocked now, which is good.

Back to the first connection I do a COMMIT or ROLLBACK and connection 2 gets a
1020: Record has changed since last read in table 't1'

But I did not change any record.
[6 Mar 2007 11:51] Hakan Küçükyılmaz
Added test case falcon_bug_26871.test to mysql-5.1-falcon tree.

Regards, Hakan
[12 Mar 2007 19:38] MySQL Verification Team
Thank you for the bug report:

mysql> SELECT a FROM t1 WHERE a = 1 FOR UPDATE;
ERROR 1020 (HY000): Record has changed since last read in table 't1'
mysql>
[19 Mar 2007 10:38] Hakan Küçükyılmaz
Passes now on Linux 32-bit and Linux 64-bit with change set 1.2498, 2007-03-18.

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

falcon_bug_26871               [ pass ]           4465
-------------------------------------------------------
Stopping All Servers
All 1 tests were successful.
The servers where restarted 1 times
Spent 4.465 seconds actually executing testcases

Regards, Hakan
[23 Mar 2007 8:06] MC Brown
A note has been added to the 5.2.4 changelog.
[10 Jul 2007 19:09] MC Brown
This bug report entry has been moved to the 6.0.0 Falcon changelog.