Bug #26855 Falcon reports error 1022 on index and constraint free tables
Submitted: 6 Mar 2007 1:02 Modified: 6 Apr 2007 11:40
Reporter: Chris Ricks Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S2 (Serious)
Version:5.2.3 OS:Windows (Windows XP)
Assigned to: Assigned Account CPU Architecture:Any

[6 Mar 2007 1:02] Chris Ricks
Description:
Upon attempting to execute:

INSERT INTO acct_falcon SELECT * FROM acct_innodb LIMIT 2147483648

execution appears to progress normally. After about 45 seconds (about the time it takes to execute the same command with an InnoDB target), MySQL reports error 1022 (duplicate key in table acct_falcon). The source table contains just over 13 million rows.

The table has the following schema:

CREATE TABLE  `pmacct`.`acct_falcon` (
  `agent_id` int(2) unsigned NOT NULL,
  `mac_src` char(17) CHARACTER SET latin1 NOT NULL,
  `mac_dst` char(17) CHARACTER SET latin1 NOT NULL,
  `vlan` int(2) unsigned NOT NULL,
  `ip_src` char(15) CHARACTER SET latin1 NOT NULL,
  `ip_dst` char(15) CHARACTER SET latin1 NOT NULL,
  `src_port` int(2) unsigned NOT NULL,
  `dst_port` int(2) unsigned NOT NULL,
  `ip_proto` char(6) CHARACTER SET latin1 NOT NULL,
  `tos` int(4) unsigned NOT NULL,
  `packets` int(10) unsigned NOT NULL,
  `bytes` bigint(20) unsigned NOT NULL,
  `flows` int(10) unsigned NOT NULL,
  `stamp_inserted` datetime NOT NULL,
  `stamp_updated` datetime DEFAULT NULL
) ENGINE=Falcon DEFAULT CHARSET=utf8;

The same error occurs if attempting to use CREATE TABLE SELECT ... .

Additionally, after attempting to populate the table, attempting to drop the table fails and attempting to issue SELECT statements causes MySQL to crash, as does attempting to query STATUS information for the database containing the Falcon table. 

The MySQL log contains the following entries at completion of the INSERT ... SELECT:

database open failed: can't open file "C:\Program Files\MySQL\MySQL Server 5.2\Data\pm.fts": No such file or directory (2)
database open failed: can't open file "C:\Program Files\MySQL\MySQL Server 5.2\Data\pm.fts": No such file or directory (2)
database open failed: can't open file "C:\Program Files\MySQL\MySQL Server 5.2\Data\pm.fts": No such file or directory (2)
database open failed: can't open file "C:\Program Files\MySQL\MySQL Server 5.2\Data\pm.fts": No such file or directory (2)
database open failed: can't open file "C:\Program Files\MySQL\MySQL Server 5.2\Data\pm.fts": No such file or directory (2)
database open failed: can't open file "C:\Program Files\MySQL\MySQL Server 5.2\Data\pm.fts": No such file or directory (2)
database open failed: memory is exhausted

How to repeat:
Execute the above INSERT .. SELECT statement with a sufficiently large dataset.

The actual data used is available (about a 70MB .bz2 archive).

Suggested fix:
Correct Falcon behaviour.
[6 Mar 2007 11:40] MySQL Verification Team
Thank you for the bug report. Yes please provide the data archive
at: ftp://ftp.mysql.com/pub/mysql/upload and let us know when
done and the file name. Thanks in advance.
[6 Mar 2007 11:53] Hakan Küçükyılmaz
This sounds a bit like our current memory limitation for large transactions in Falcon.

How much RAM do you have on your machine? Did you try to do the load with smaller chunks?

Best regards,

Hakan
[6 Apr 2007 23: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".