Bug #12598 autocommit 0: row visible after delete in same transaction
Submitted: 16 Aug 2005 13:03 Modified: 22 Aug 2005 9:39
Reporter: Berto van de Kraats Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.12-beta (0816) OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[16 Aug 2005 13:03] Berto van de Kraats
Description:
If autocommit is turned off and a delete of a row is done, then in the same transaction that row is still visible with a query with a >= operator.

How to repeat:
Compile and run the attached program. It reproduces the problem if it silently runs with exit status 0.
The program checks that data is returned that was deleted by the previous delete statement (search for "Error:" pattern).
[16 Aug 2005 13:04] Berto van de Kraats
Trace of problem

Attachment: bug12598.cpp (text/plain), 21.71 KiB.

[19 Aug 2005 14:43] MySQL Verification Team
miguel@hegel:~/dbs/5.0> libexec/mysqld
050819 11:02:01  InnoDB: Started; log sequence number 0 51687
050819 11:02:01 [Note] libexec/mysqld: ready for connections.
Version: '5.0.12-beta-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
InnoDB: Error: MySQL is trying to perform a SELECT
InnoDB: but it has not locked any tables in ::external_lock()!
TRANSACTION 0 2818, ACTIVE 0 sec, process no 6924, OS thread id 1132370864
2 lock struct(s), heap size 320, undo log entries 1
MySQL thread id 5, query id 43 localhost root
SELECT a0.t_empno FROM tdbtst190000 a0  WHERE (a0.t_empno >= ?) ORDER BY 1
[19 Aug 2005 14:49] Andrey Hristov
Berto, you delete a row and then a cursor sees that row? Is this what you experience? If yes, then try a new snapshot from today. A quick fix for that issue has been committed and more or less this bug is a dupe of bug #12456.
[19 Aug 2005 15:10] Berto van de Kraats
Andrey ,

Yes, that sound pretty much like my case. I've downloaded the 5.0.12 snapshot of today (0819). Will try it coming Monday.

Thanks,
Berto
[22 Aug 2005 8:14] Berto van de Kraats
Andrey, the snapshot of August, 19 fixes this problem.
Thanks, Berto.
[22 Aug 2005 9:39] Andrey Hristov
dupe of 12456