[MDEV-14326] engine ARIA with row_format=FIXED is broken Created: 2017-11-08  Updated: 2021-02-21  Resolved: 2018-01-18

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Aria
Affects Version/s: 10.2.10
Fix Version/s: 10.2.13

Type: Bug Priority: Major
Reporter: Marc Pohl Assignee: Michael Widenius
Resolution: Fixed Votes: 1
Labels: regression
Environment:

Ubuntu 16.04 LTS 64 Bit (fresh install in VM)
mariadb 10.2.10-MariaDB-10.2.10+maria~xenial-log from official repository (fresh install)


Issue Links:
Relates
relates to MDEV-14542 Engine Aria index limitations if row_... Closed

 Description   

hi,

i discovered a bug when using the storage-engine ARIA with row_format=FIXED. we use this combination for an efficient storage of a highly partioned table with more than 4*10^9 rows.

after migration from mariadb 10.1 to 10.2 our import was broken because of

 ERROR 1114 (HY000) at line 34: The table 'nutzung' is full

my first thought was that it is a problem related to partitioning (we create a new partition every month and first occurence of the problem was on the same day).
i started a clean rebuild of the complete database, but the error remains and already occured during the import.

after playing around with the create-statement i detected that this problem is not related to partitioning but to the row_format.

our table definition is not very complex

>CREATE TABLE `nutzung` (
>  `id1` mediumint(8) unsigned NOT NULL,
>  `id2` int(10) unsigned NOT NULL,
>  `start` int(10) unsigned NOT NULL,
>  `ende` int(10) unsigned NOT NULL,
>  `laenge` mediumint(8) unsigned NOT NULL,
>  `bytes` bigint(20) unsigned NOT NULL,
>  `flag` tinyint(3) unsigned NOT NULL DEFAULT 0,
>  `ident` char(16) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
>  `dummy` char(2) CHARACTER SET ascii COLLATE ascii_bin NOT NULL DEFAULT '',
>  KEY `idx_id2` (`id2`),
>  KEY `idx_id1` (`id1`),
>  KEY `idx_start` (`start`),
>  KEY `idx_ende` (`ende`)
>) ENGINE=Aria DEFAULT CHARSET=ascii row_format=FIXED;

when we now insert data into this table, then the table is full after the fourth multi-insert-statement (1MB sql per statement ).
"show table status" now shows

 nutzung | Aria | 10 | Fixed | 65535 | 46 | 3014610 | 3014655 | 1957888 | 0 | NULL | ...  | row_format=FIXED

you will note that max_data_length is a small value
and "check table" reports

 ...nutzung | check |warning | datefile ist almost full, 3014610 of 3014655 used

we now reverted the database to current release of mariadb 10.1 and after reimport everything was ok again.

"show table" in 10.1 reports for the table

 | nutzung           | Aria   |      10 | Fixed      | 4186352479 |             46 | 192572214034 |               0 | 121799540736 |         0 |           NULL | 2017-11-08 01:37:42 | 2017-11-08 10:29:43 | 2017-11-08 12:49:30 | ascii_general_ci |     NULL | row_format=FIXED partitioned |

regards
marc



 Comments   
Comment by Alice Sherepa [ 2017-11-17 ]

Thanks for the report! Error appears on MariaDB versions >=10.2.7 after commit dd8474b1dc556d0ea9491d1908a2d1

testcase:

--source include/have_sequence.inc
CREATE TABLE `t1` (`id` int ) ENGINE=Aria row_format=FIXED;
INSERT INTO t1 SELECT seq FROM seq_1_to_100000;
SHOW TABLE STATUS;
CHECK TABLE t1;
DROP TABLE t1;

 
ERROR 1114 (HY000)  The table 't1' is full
+------+--------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+------------------+---------+
| Name | Engine | Version | Row_format | Rows  | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time         | Check_time | Collation         | Checksum | Create_options   | Comment |
+------+--------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+------------------+---------+
| t1   | Aria   |      10 | Fixed      | 65535 |              5 |      327675 |          327679 |         8192 |         0 |           NULL | 2017-11-17 12:31:13 | 2017-11-17 12:31:13 | NULL       | latin1_swedish_ci |     NULL | row_format=FIXED |         |
+------+--------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+------------------+---------+
1 row in set (0.00 sec)

Comment by Michael Widenius [ 2018-01-18 ]

A workaround is to specify MAX_ROWS when creating the Aria table.

By default, the number of rows allocated for FIXED is too small. Will fix that this only happens if one explicitly uses max_rows to limit the size of the table.

Comment by Michael Widenius [ 2018-01-18 ]

Fix pushed

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