Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11305

MariDB 10.2.2 errno: 140 "Wrong create options", when creating an innodb Table with 'ROW_FORMAT=FIXED' options

Details

    Description

      When trying to create an innodb table with this settings

      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

      Can't create table `ezgobx`.`__syssequences` (errno: 140 "Wrong create options")

      If I remove ROW_FORMAT=FIXED or set ROW_FORMAT=DEFAULT it works perfect. I used that creation option in mysql 5.6 wihout issues

      Attachments

        Activity

          InnoDB does not have ROW_FORMAT FIXED. It didn't have it in MySQL 5.6 either.

          However, in InnoDB 5.6 (both in MySQL 5.6 and MariaDB 10.0/10.1) innodb_strict_mode=0 by default, that's why the CREATE statement simply issued a warning and assumed COMPACT format instead.

          MySQL [test]> select @@version;
          +--------------+
          | @@version    |
          +--------------+
          | 5.6.33-debug |
          +--------------+
          1 row in set (0.00 sec)
           
          MySQL [test]> 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;
          Query OK, 0 rows affected, 1 warning (0.35 sec)
           
          MySQL [test]> show warnings;
          +---------+------+--------------------------------------+
          | Level   | Code | Message                              |
          +---------+------+--------------------------------------+
          | Warning | 1478 | InnoDB: assuming ROW_FORMAT=COMPACT. |
          +---------+------+--------------------------------------+
          1 row in set (0.00 sec)
          

          In InnoDB 5.7 (both in MySQL 5.7 and MariaDB 10.2) innodb_strict_mode=1 by default, so both of them fail to create a table with the wrong ROW_FORMAT.
          If you want the old behavior, set innodb_strict_mode=0.

          greenman,
          Maybe it should be explained somehow in the documentation if it hasn't been yet (I couldn't find).
          While technically every part of it is documented separately – supported row formats as well as the new default for the strict mode, – it might be not easy for users to put it all together.
          MySQL, for example, describes it directly at CREATE TABLE page: https://dev.mysql.com/doc/refman/5.7/en/create-table.html

          elenst Elena Stepanova added a comment - InnoDB does not have ROW_FORMAT FIXED . It didn't have it in MySQL 5.6 either. However, in InnoDB 5.6 (both in MySQL 5.6 and MariaDB 10.0/10.1) innodb_strict_mode=0 by default, that's why the CREATE statement simply issued a warning and assumed COMPACT format instead. MySQL [test]> select @@version; + --------------+ | @@version | + --------------+ | 5.6.33-debug | + --------------+ 1 row in set (0.00 sec)   MySQL [test]> 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; Query OK, 0 rows affected, 1 warning (0.35 sec)   MySQL [test]> show warnings; + ---------+------+--------------------------------------+ | Level | Code | Message | + ---------+------+--------------------------------------+ | Warning | 1478 | InnoDB: assuming ROW_FORMAT=COMPACT. | + ---------+------+--------------------------------------+ 1 row in set (0.00 sec) In InnoDB 5.7 (both in MySQL 5.7 and MariaDB 10.2) innodb_strict_mode=1 by default, so both of them fail to create a table with the wrong ROW_FORMAT. If you want the old behavior, set innodb_strict_mode=0 . greenman , Maybe it should be explained somehow in the documentation if it hasn't been yet (I couldn't find). While technically every part of it is documented separately – supported row formats as well as the new default for the strict mode, – it might be not easy for users to put it all together. MySQL, for example, describes it directly at CREATE TABLE page: https://dev.mysql.com/doc/refman/5.7/en/create-table.html
          greenman Ian Gilfillan added a comment -

          I have added some detail to the CREATE TABLE page, and, probably more importantly, highlighted the strict mode change on the 10.2.2 release notes page. Also discovered the rather obscure bug I reported at https://jira.mariadb.org/browse/MDEV-11316 as a result.

          Closed as not a bug, as the behaviour described in the original report is expected with the change to the default strict mode.

          greenman Ian Gilfillan added a comment - I have added some detail to the CREATE TABLE page, and, probably more importantly, highlighted the strict mode change on the 10.2.2 release notes page. Also discovered the rather obscure bug I reported at https://jira.mariadb.org/browse/MDEV-11316 as a result. Closed as not a bug, as the behaviour described in the original report is expected with the change to the default strict mode.

          People

            greenman Ian Gilfillan
            fduenas Francisco DueƱas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.