Bug #83647 ROW_FORMAT= Dynamic can be set with innodb_file_format= Antelope
Description:
Before 5.7, table cannot be created Dynamic row-format with innodb_file_format= Antelope (Returns warning and table is created as Compact row-format)
5.7 can create Dynamic row-format table even innodb_file_format= Antelope, without any warnings and actually SHOW TABLE STATUS returns Row_format= Dynamic.
5.7's code checks innodb_file_format only when ROW_FORMAT= Compressed.
https://github.com/mysql/mysql-server/blob/mysql-5.7.16/storage/innobase/handler/ha_innodb...
5.6's one checks both when ROW_FORMAT= Compressed and ROW_FORMAT= Dynamic.
https://github.com/mysql/mysql-server/blob/mysql-5.6.34/storage/innobase/handler/ha_innodb...
Is this expected behavior?
> The Barracuda file format is required to use Compressed or Dynamic row formats and associated features such as compression,
http://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_file_format
If this (Can use ROW_FORMAT= Dynamic even with innodb_file_format=Antelope) is expected,
please change category to "MySQL Server: Documentation" (Fix to "Be required to use Compressed but Dynamic doesn't require now")
How to repeat:
[5.6.34]
$ bin/mysqld_safe --no-defaults --innodb-file-format=antelope --innodb-file-format-max=antelope &
mysql> CREATE TABLE t1 (num int) Engine= InnoDB ROW_FORMAT= Dynamic;
Query OK, 0 rows affected, 2 warnings (0.01 sec)
mysql> SHOW WARNINGS;
+---------+------+--------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+--------------------------------------------------------------------+
| Warning | 1478 | InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. |
| Warning | 1478 | InnoDB: assuming ROW_FORMAT=COMPACT. |
+---------+------+--------------------------------------------------------------------+
2 rows in set (0.00 sec)
mysql> SHOW GLOBAL VARIABLES LIKE 'innodb\_file\_format%';
+--------------------------+-----------+
| Variable_name | Value |
+--------------------------+-----------+
| innodb_file_format | Antelope |
| innodb_file_format_check | ON |
| innodb_file_format_max | Barracuda |
+--------------------------+-----------+
3 rows in set (0.00 sec)
mysql> SHOW CREATE TABLE t1\G
*************************** 1. row ***************************
Table: t1
Create Table: CREATE TABLE `t1` (
`num` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC
1 row in set (0.00 sec)
mysql> SHOW TABLE STATUS LIKE 't1'\G
*************************** 1. row ***************************
Name: t1
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 0
Avg_row_length: 0
Data_length: 16384
Max_data_length: 0
Index_length: 0
Data_free: 0
Auto_increment: NULL
Create_time: 2016-11-02 18:16:54
Update_time: NULL
Check_time: NULL
Collation: utf8mb4_general_ci
Checksum: NULL
Create_options: row_format=DYNAMIC
Comment:
1 row in set (0.00 sec)
[5.7.16]
$ bin/mysqld_safe --no-defaults --innodb-file-format=antelope --innodb-file-format-max=antelope &
mysql> SHOW GLOBAL VARIABLES LIKE 'innodb\_file\_format%';
+--------------------------+-----------+
| Variable_name | Value |
+--------------------------+-----------+
| innodb_file_format | Antelope |
| innodb_file_format_check | ON |
| innodb_file_format_max | Barracuda |
+--------------------------+-----------+
3 rows in set (0.00 sec)
mysql> CREATE TABLE t1 (num int) Engine= InnoDB ROW_FORMAT= Dynamic;
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW CREATE TABLE t1\G
*************************** 1. row ***************************
Table: t1
Create Table: CREATE TABLE `t1` (
`num` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC
1 row in set (0.00 sec)
mysql> SHOW TABLE STATUS LIKE 't1'\G
*************************** 1. row ***************************
Name: t1
Engine: InnoDB
Version: 10
Row_format: Dynamic
Rows: 0
Avg_row_length: 0
Data_length: 16384
Max_data_length: 0
Index_length: 0
Data_free: 0
Auto_increment: NULL
Create_time: 2016-11-02 18:14:43
Update_time: NULL
Check_time: NULL
Collation: utf8mb4_general_ci
Checksum: NULL
Create_options: row_format=DYNAMIC
Comment:
1 row in set (0.00 sec)
Suggested fix:
See Description.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.040 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.