Bug #25594 CREATE TABLE ... INSERT doesn't properly lock the table with falcon engine
Submitted: 12 Jan 2007 20:21 Modified: 18 Nov 2007 22:24
Reporter: jocelyn fournier (Silver Quality Contributor) Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:5.2.1-bk OS:Linux (Linux)
Assigned to: CPU Architecture:Any
Tags: qc

[12 Jan 2007 20:21] jocelyn fournier
Description:
Hi,

If an INSERT is executed concurrently to CREATE TABLE ... INSERT command on the same table, the INSERT will be executed instantaneously, but when the CREATE TABLE ... INSERT command will finished, only the rows from the INSERT command will be present.

Regards,
  Jocelyn Fournier
  www.mesdiscussions.net

How to repeat:
You can use the table from ftp://ftp.mysql.com/pub/mysql/upload/i1.tar.gz to do
the test :

From the first client :

use test
CREATE TABLE a ENGINE=Falcon SELECT * FROM test1.inscrit1;

From the second client :

use test
INSERT INTO a (id) VALUES (1);
INSERT INTO a (id) VALUES (1);
INSERT INTO a (id) VALUES (1);
SELECT * FROM a;

=> will return 3 results.

When the first client finishs the command (much quicker than expected BTW) :

mysql> CREATE TABLE a ENGINE=Falcon SELECT * FROM test1.inscrit1;
Query OK, 88552 rows affected (57.21 sec)
Records: 88552  Duplicates: 0  Warnings: 0

SELECT * FROM a;

=> will return 3 results.

Suggested fix:
LOCK the table during the CREATE TABLE ... INSERT command ?
[14 Jan 2007 9:31] MySQL Verification Team
Thank you for the bug report.
[26 Jan 2007 15:39] jocelyn fournier
Hi,

This seems to fixed with the latest bk changeset.

Thanks,
  Jocelyn
[16 Oct 2007 11:53] Hakan Küçükyılmaz
Miguel,

can you please verify that this bug is fixed?

Best regards,

Hakan
[19 Nov 2007 0: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".