Bug #6748 Record has changed since last read in table ... error on HEAP table
Submitted: 22 Nov 2004 7:08 Modified: 22 Nov 2004 13:22
Reporter: jocelyn fournier (Silver Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.8 bktree OS:Linux (Linux)
Assigned to: Sergei Golubchik

[22 Nov 2004 7:08] jocelyn fournier
Description:
Hi,

On some cases, when reading a HEAP tables containing only one row, MySQL can report incorrectly "Record has changed since last read in table ..." error.

Thanks !
  Jocelyn

How to repeat:
CREATE TABLE `online1` (
  `pseudo` char(35) NOT NULL default '',
  `date` int(10) unsigned NOT NULL default '0',
  `cat` tinyint(4) unsigned NOT NULL default '0',
  `forum` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`pseudo`),
  KEY `forum` (`forum`),
  KEY `date` TYPE BTREE (`date`)
) ENGINE=HEAP DEFAULT CHARSET=latin1 MAX_ROWS=10000;

INSERT INTO online1 VALUES ('massecot',1101106491,1,18),('altec',1101106492,10,1),('stitch+',1101106304,4,1),('Seb Corgan',1101106305,12,1),('beerfilou',1101106263,6,18),('flaker',1101106529,3,29),('joce8',5,1,1),('M4vrick',1101106418,5,8),('gabay008',1101106525,3,29),('VampirX',1101106291,4,1),('ZoomZip',1101106546,0,12),('rip666',1101106502,4,1),('CBP',1101106397,2,67),('guezpard',1101106496,4,1);

SELECT * FROM online1 ORDER BY date DESC;

DELETE FROM online1 WHERE date<1101106546;

SELECT COUNT(*) FROM online1 WHERE forum='1';
[22 Nov 2004 13:22] Sergei Golubchik
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

fixed in 4.1.8, thank you!