Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.2
Description
With innodb_strict_mode set to OFF, and innodb_default_row_format set to COMPACT, when creating a table and specifying ROW_FORMAT=FIXED, the table is created with the DYNAMIC row format instead.
SET innodb_strict_mode=0; |
SET GLOBAL innodb_default_row_format='COMPACT' |
|
CREATE TABLE `__syssequences` ( |
`systemName` CHAR(50) NOT NULL, |
`sequenceName` CHAR(50) NOT NULL, |
`sequenceStep` INT(11) DEFAULT '1', |
`lastValue` INT(11) DEFAULT '1', |
`lastInsert` DATETIME DEFAULT '0000-00-00 00:00:00', |
`lastUpdate` DATETIME DEFAULT '0000-00-00 00:00:00', |
PRIMARY KEY (`systemName`,`sequenceName`) |
) ENGINE=INNODB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED; |
|
SHOW TABLE STATUS LIKE '__syssequences'\G |
*************************** 1. row ***************************
|
Name: __syssequences |
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-19 17:58:28
|
Update_time: NULL |
Check_time: NULL |
Collation: utf8_general_ci
|
Checksum: NULL |
Create_options: row_format=FIXED
|
Comment:
|
1 row in set (0.00 sec) |
Same with MySQL 5.7.
My guess is it's actually by design, but is wrongly documented in MySQL manual.
The manual says:
That is, it does not cover the case with ROW_FORMAT=FIXED.
This case is described separately in the manual:
Of course, it's wrong. I think they forgot to change it when they changed the "favorit" format from COMPACT to DYNAMIC, but the idea probably remains – if ROW_FORMAT=FIXED is specified, it's not the default that is applied, but a specific replacement – COMPACT in 5.6, DYNAMIC in 5.7.
Of course, it's me reading between the lines, so I'll assign it to jplindst for the expert opinion.