[MDEV-27679] Aria ROW_FORMAT=FIXED + LONG bug Created: 2022-01-29  Updated: 2022-01-31  Resolved: 2022-01-31

Status: Closed
Project: MariaDB Server
Component/s: Data types, Server, Storage Engine - Aria
Affects Version/s: 10.5.13
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Micael Narine Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Linux



 Description   

The Aria storage engine is supposed to accept ROW_FORMAT=FIXED on tables that don't contain BLOB or TEXT fields; however it fails back to ROW_FORMAT=PAGE when a LONG datatype is present.

CREATE TABLE a (
foo INT NOT NULL
)
ENGINE=Aria ROW_FORMAT=FIXED;

CREATE TABLE b (
foo LONG NOT NULL
)
ENGINE=Aria ROW_FORMAT=FIXED;

SHOW TABLE STATUS;
^ Note the Row_format and Create_options fields



 Comments   
Comment by Alice Sherepa [ 2022-01-31 ]

KB says "Tables containing BLOB or TEXT fields cannot be FIXED, as by design these are both dynamic fields. However, no error or warning will be raised if you specify FIXED." https://mariadb.com/kb/en/aria-storage-formats/#fixed-length , https://mariadb.com/kb/en/myisam-storage-formats/#fixed-length

Comment by Micael Narine [ 2022-01-31 ]

Thanks Alice, yes the documentation says that BLOB/TEXT stops tables being FIXED. However all other field types, including LONG, are permitted to be fixed. As per my example, a table with a LONG in stops FIXED being used when it should be accepted.

Comment by Alice Sherepa [ 2022-01-31 ]

Maybe it was not quite clearly written, but row_format=fixed will not be used with any blob - so tinytext,mediumtext,longtext,tinyblob,..
LONG and LONG VARCHAR are synonyms for MEDIUMTEXT.

MariaDB [test]> CREATE or replace TABLE b ( foo LONG NOT NULL ) ENGINE=Aria ROW_FORMAT=FIXED;
Query OK, 0 rows affected (0.049 sec)
 
MariaDB [test]> show create table b;
+-------+---------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                        |
+-------+---------------------------------------------------------------------------------------------------------------------+
| b     | CREATE TABLE `b` (
  `foo` mediumtext NOT NULL
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=PAGE |
+-------+---------------------------------------------------------------------------------------------------------------------+
1 row in set (0.002 sec)

Comment by Micael Narine [ 2022-01-31 ]

Thank you, yes you are correct this is the expected behavior.

Generated at Thu Feb 08 09:54:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.