[MDEV-17968] Error 174 "Fatal error during initialization of handler" on partitioned Aria table Created: 2018-12-11  Updated: 2023-04-12

Status: Stalled
Project: MariaDB Server
Component/s: Partitioning
Affects Version/s: 10.4, 10.5
Fix Version/s: 10.4, 10.5

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexey Botchkov
Resolution: Unresolved Votes: 0
Labels: regression

Issue Links:
Relates
relates to MDEV-22283 Server crashes in key_copy or unexpec... Closed

 Description   

--source include/have_partition.inc
 
CREATE TEMPORARY TABLE tmp (i INT) ENGINE=Aria;
CREATE TABLE t1 LIKE tmp;
INSERT INTO t1 () VALUES (),() ;
ALTER TABLE t1 PARTITION BY RANGE(i) (PARTITION p1 VALUES LESS THAN (10), PARTITION p2 VALUES LESS THAN (100));
ALTER TABLE t1 ADD PARTITION (PARTITION p3 VALUES LESS THAN (1000));
DELETE FROM t1;
 
# Cleanup
DROP TABLE t1;

10.4 8cf7e3459d7309

MariaDB [test]> DELETE FROM t1;
ERROR 1030 (HY000): Got error 174 "Fatal error during initialization of handler" from storage engine Aria

Not reproducible on 10.3.
Not reproducible with MyISAM.



 Comments   
Comment by Sergei Golubchik [ 2018-12-11 ]

This is partition's error, not Aria's.

First two aria partitions don't have HA_OPTION_PAGE_CHECKSUM, the last one does. After MDEV-5336 this causes partitions to have differently set HA_CAN_ONLINE_BACKUPS. And ha_partition verifies that all partitions have identical table flags.

The real bug is, probably, different default value for HA_OPTION_PAGE_CHECKSUM.

Comment by Sergei Golubchik [ 2018-12-11 ]

But then, what should happen if the user explicitly has specified checksum option to have different values for different partitions?

Comment by Alexander Barkov [ 2018-12-12 ]

Sorry, closed in a mistake. Reopening.

Comment by Elena Stepanova [ 2020-04-17 ]

On some reason the test case from the description doesn't fail anymore, but this one still does (and doesn't require temporary tables, either):

--source include/have_partition.inc
 
CREATE TABLE t1 (a INT) ENGINE=Aria PAGE_CHECKSUM=0 PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN (10));
ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES LESS THAN (20));
SHOW CREATE TABLE t1;
 
# Cleanup
DROP TABLE t1;

10.4 af912664

query 'SHOW CREATE TABLE t1' failed: 1030: Got error 174 "Fatal error during initialization of handler" from storage engine Aria

Generated at Thu Feb 08 08:40:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.