Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.11, 11.4, 11.8, 12.3, 13.0, 13.1, 13.2
-
None
Description
--source include/have_partition.inc
|
 |
SET timestamp= UNIX_TIMESTAMP('2026-05-02 00:00:00'); |
--error 0,ER_PARSE_ERROR
|
CREATE TABLE t1 (a INT) ENGINE=Aria ROW_FORMAT=FIXED WITH SYSTEM VERSIONING PARTITION BY SYSTEM_TIME INTERVAL 1 HOUR AUTO PARTITIONS 3; |
if ($mysql_errno) |
{
|
--skip Needs SYSTEM_TIME ... AUTO partitioning |
}
|
INSERT INTO t1 VALUES (1),(2); |
SET timestamp= UNIX_TIMESTAMP('2026-05-02 05:00:00'); |
# The DELETE adds history partitions |
DELETE FROM t1 WHERE a= 1; |
SELECT * FROM t1 FOR SYSTEM_TIME ALL; |
DROP TABLE t1; |
Leads to:
|
CS 13.1.2 87e62ca17270e163a6d41b3fc8d6f4d440f1bb88 (Debug, Clang 22.1.8-20260622) Build 06/10/2026 |
mysqltest: At line 13: query 'DELETE FROM t1 WHERE a= 1' failed: ER_GET_ERRNO (1030): Got error 174 "Fatal error during initialization of handler" from storage engine Aria
|
The DELETE adds the history partitions p2 to p5. aria_chk -d shows Record format: Block for these, and Fixed length for p0, p1 and pn. After this, the table can no longer be opened, also after a restart. SELECT, INSERT and SHOW CREATE TABLE give the same error, and CHECK TABLE and REPAIR TABLE report it, with Corrupt. Only DROP TABLE works. Optimized builds give the same result.
Aria with ROW_FORMAT=DYNAMIC also gives error 1030. MyISAM gives error 1030 with error 190 ("Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine") when the table has ROW_FORMAT=DYNAMIC with only fixed-length columns, or ROW_FORMAT=FIXED with a VARCHAR column. InnoDB gives no error, but the new partitions get the default row format, and SHOW CREATE TABLE no longer shows the ROW_FORMAT of the table. The partitions that an INSERT adds with RANGE COLUMNS ... INTERVAL partitioning give the same results. An explicit ALTER TABLE ... ADD PARTITION keeps the row format. Aria with PAGE_CHECKSUM=0 gives error 174 as well, but there an explicit ADD PARTITION gives it too, as in MDEV-17968.
From the code it seems that vers_create_partitions() in sql/partition_info.cc and range_interval_create_partitions() in sql/sql_partition_auto_interval.cc pass a new create_info without the row format to alter_add_partitions(). mysql_alter_table() in sql/sql_table.cc copies the row format of the table when the statement does not give one, and alter_add_partitions() does not go through it.
Attachments
Issue Links
- is caused by
-
MDEV-15621 Implement interval partitioning similar to Oracle
-
- Closed
-
-
MDEV-17554 Auto-create history partitions for system-versioned tables
-
- Closed
-
- relates to
-
MDEV-17968 Error 174 "Fatal error during initialization of handler" on partitioned Aria table
-
- Stalled
-