Bug #71211 ARCHIVE engine does not guarantee UNIQUE and PRIMARY KEY constraints
| Submitted: | 23 Dec 2013 9:21 | Modified: | 23 Sep 2025 9:20 |
|---|---|---|---|
| Reporter: | Przemyslaw Malkowski | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Archive storage engine | Severity: | S2 (Serious) |
| Version: | 5.1, 5.5, 5.6, 8.4, 9.4 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | archive | ||
[23 Dec 2013 9:29]
MySQL Verification Team
Hello Przemyslaw, Thank you for the bug report and test case. Verified as described. Thanks, Umesh
[24 Dec 2013 23:01]
Shane Bester
also: http://bugs.mysql.com/bug.php?id=40216
[23 Sep 2025 9:20]
Przemyslaw Malkowski
Hey, is there anyone still using the ARCHIVE Storage Engine these days? MySQL team - this engine code has been abandoned for over a decade. Wouldn't it be better to deprecate it completely and eliminate all the related source code burden? Unless you have a plan to update it and make the engine finally usable?
[23 Sep 2025 9:35]
Daniƫl van Eeden
Would be good to convert this to a optional storage engine that isn't loaded by default.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: You can break uniqueness in a table using Archive engine by just using optimize or repair commands. How to repeat: mysql> CREATE TABLE `c` ( `id` int(11) NOT NULL AUTO_INCREMENT, UNIQUE KEY (`id`) ) ENGINE=ARCHIVE; Query OK, 0 rows affected (0.01 sec) mysql> insert into c values (null); Query OK, 1 row affected (0.00 sec) mysql> insert into c values (null); Query OK, 1 row affected (0.00 sec) mysql> insert into c values (null); Query OK, 1 row affected (0.00 sec) mysql> select * from c; +----+ | id | +----+ | 1 | | 2 | | 3 | +----+ 3 rows in set (0.01 sec) mysql> optimize table c; +--------+----------+----------+----------+ | Table | Op | Msg_type | Msg_text | +--------+----------+----------+----------+ | test.c | optimize | status | OK | +--------+----------+----------+----------+ 1 row in set (0.01 sec) mysql> insert into c values (null); Query OK, 1 row affected (0.00 sec) mysql> select * from c; +----+ | id | +----+ | 1 | | 2 | | 3 | | 1 | +----+ 4 rows in set (0.01 sec) mysql> show indexes from c\G *************************** 1. row *************************** Table: c Non_unique: 0 Key_name: id Seq_in_index: 1 Column_name: id Collation: NULL Cardinality: NULL Sub_part: NULL Packed: NULL Null: Index_type: NONE Comment: Index_comment: 1 row in set (0.00 sec) Suggested fix: Make the Archive engine SQL standards compliant.