Bug #65614 Concurrent SELECT with INSERT return error about key file
Submitted: 14 Jun 2012 10:33 Modified: 14 Jul 2012 11:40
Reporter: Pedro Fonseca Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S3 (Non-critical)
Version:5.5.19 OS:Any
Assigned to: CPU Architecture:Any

[14 Jun 2012 10:33] Pedro Fonseca
Description:
We're using mysqld version 5.5.19 built from source. We found a
concurrency bug in MyISAM storage engine that causes the server to 
return an error related to the key file. The bug is triggered when 
an INSERT request is concurrently executed with a SELECT request 
by different clients. In some executions, instead of executing 
the requests without any error, the server returns an error 
complaining about the key file.

How to repeat:
This is a non-deterministic bug that is triggered only in a very small
number of executions. We used the following server command line
options to enable MyISAM and to disable InnoDB storage engine:
  --default-storage-engine=myisam --innodb=OFF

The following requests trigger the bug under some executions:

Client A: 
       create database new_db;
       use new_db;
       CREATE TABLE t1 ( i int(10) unsigned not null auto_increment primary key, a varchar(255) not null, FULLTEXT KEY (a) ) ENGINE=MyISAM

Client B: 
       use new_db;

Client A (concurrently with Client B):
       insert t1 (a) values ('aaaxxx'),('aaayyy')

Client B (concurrently with Client A):
       select count(*) from t1 where match a against ('aaazzz')

The usual behavior is for no error to be returned. However,
we found that in a small fraction of the executions client A, 
while executing the SELECT, gets the error:
   "ERROR 126 (HY000) at line 2: Incorrect key file for table './new_db/t1.MYI'; try to repair it"
[14 Jun 2012 11:40] Valeriy Kravchuk
Please, check if this ever happens with a recent version, 5.5.25, and using Oracle binaries (if available on your platform)?
[15 Jul 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".