Bug #84006 Action upon setting ROW_FORMAT=FIXED for InnoDB table is wrongly documented
Submitted: 29 Nov 2016 15:41 Modified: 1 Dec 2016 19:32
Reporter: Elena Stepanova Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[29 Nov 2016 15:41] Elena Stepanova
Description:
The manual says:

<quote>
ROW_FORMAT=FIXED is not supported. If ROW_FORMAT=FIXED is specified while innodb_strict_mode is disabled, InnoDB issues a warning and assumes ROW_FORMAT=COMPACT
</quote>
http://dev.mysql.com/doc/refman/5.7/en/create-table.html

It is true for previous versions, where COMPACT was default; but in 5.7 InnoDB assumes ROW_FORMAT=DYNAMIC instead (always, regardless the value of innodb_default_row_format).

MySQL [test]> select @@innodb_default_row_format;
+-----------------------------+
| @@innodb_default_row_format |
+-----------------------------+
| dynamic                     |
+-----------------------------+
1 row in set (0.00 sec)

MySQL [test]> create table t1 (i int) ROW_FORMAT=FIXED;
Query OK, 0 rows affected, 1 warning (0.42 sec)

MySQL [test]> show warnings;
+---------+------+--------------------------------------+
| Level   | Code | Message                              |
+---------+------+--------------------------------------+
| Warning | 1478 | InnoDB: assuming ROW_FORMAT=DYNAMIC. |
+---------+------+--------------------------------------+
1 row in set (0.00 sec)

MySQL [test]> set global innodb_default_row_format = COMPACT;
Query OK, 0 rows affected (0.00 sec)

MySQL [test]> create table t2 (i int) ROW_FORMAT=FIXED;
Query OK, 0 rows affected, 1 warning (0.37 sec)

MySQL [test]> select table_name, Engine, Row_format from information_schema.tables where table_name = 't2';
+------------+--------+------------+
| table_name | Engine | Row_format |
+------------+--------+------------+
| t2         | InnoDB | Dynamic    |
+------------+--------+------------+
1 row in set (0.01 sec)

The actual behavior makes sense, so apparently documentation needs to be fixed. 

How to repeat:
See http://dev.mysql.com/doc/refman/5.7/en/create-table.html
[29 Nov 2016 23:05] MySQL Verification Team
Thank you for the bug report.

c:\dbs>5.7\bin\mysql -uroot -p test
Enter password: *********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.16-log MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select @@innodb_default_row_format;
+-----------------------------+
| @@innodb_default_row_format |
+-----------------------------+
| dynamic                     |
+-----------------------------+
1 row in set (0.00 sec)

mysql> select @@innodb_strict_mode;
+----------------------+
| @@innodb_strict_mode |
+----------------------+
|                    1 |
+----------------------+
1 row in set (0.00 sec)

mysql> set @@innodb_strict_mode = 0;
Query OK, 0 rows affected (0.00 sec)

mysql> use test
Database changed
mysql> create table t1 (i int) ROW_FORMAT=FIXED;
Query OK, 0 rows affected, 1 warning (0.33 sec)

mysql> show warnings;
+---------+------+--------------------------------------+
| Level   | Code | Message                              |
+---------+------+--------------------------------------+
| Warning | 1478 | InnoDB: assuming ROW_FORMAT=DYNAMIC. |
+---------+------+--------------------------------------+
1 row in set (0.00 sec)
[1 Dec 2016 19:32] Daniel Price
Posted by developer:
 
The referenced documentation has been updated. The change should appear online soon.

Thank you for the bug report.