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

LP:425916 - CREATE TABLE with unsupported table option keeps the option

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.31, 5.3.13, 5.2.15
    • Component/s: None
    • Labels:

      Description

      CREATE TABLE will produce a warning when table's storage engine doesn't support transactional=0|1 attribute but won't produce warnings for page_checksum or row_format attributes.

      Moreover, the attributes will be kept (in .frm file?) and displayed by SHOW CREATE TABLE which creates an illusion that the storage engine actually supports them:

      mysql> create table t1 (a int) transactional=0;
      Query OK, 0 rows affected, 1 warning (0.01 sec)
      
      mysql> create table t2 (a int) page_checksum=1;
      Query OK, 0 rows affected (0.01 sec)
      
      mysql> create table t3 (a int) row_format=page;
      Query OK, 0 rows affected (0.01 sec)
      
      mysql> show create table t3\G
      *************************** 1. row ***************************
             Table: t3
      Create Table: CREATE TABLE `t3` (
        `a` int(11) DEFAULT NULL
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE
      1 row in set (0.00 sec)
      
      mysql> show create table t2\G
      *************************** 1. row ***************************
             Table: t2
      Create Table: CREATE TABLE `t2` (
        `a` int(11) DEFAULT NULL
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
      1 row in set (0.00 sec)
      

      Suggested fix:

      • Discard unapplicable attributes
      • And produce a warning when doing that.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            sanja Oleksandr Byelkin added a comment -

            Re: CREATE TABLE with unsupported table option keeps the option
            The behaviour can be changed/touched in https://askmonty.org/worklog/Server-BackLog/?tid=43

            Show
            sanja Oleksandr Byelkin added a comment - Re: CREATE TABLE with unsupported table option keeps the option The behaviour can be changed/touched in https://askmonty.org/worklog/Server-BackLog/?tid=43
            Hide
            sanja Oleksandr Byelkin added a comment -

            Re: CREATE TABLE with unsupported table option keeps the option
            Storing attributes (even if they are not used) is correct behaviour. The bug is in absence of warning about unused attributes.

            Show
            sanja Oleksandr Byelkin added a comment - Re: CREATE TABLE with unsupported table option keeps the option Storing attributes (even if they are not used) is correct behaviour. The bug is in absence of warning about unused attributes.
            Hide
            hakanküçükyılmaz Hakan Küçükyılmaz added a comment -

            Re: CREATE TABLE with unsupported table option keeps the option
            Sanja,

            do you have an update about this bug?

            Thanks,

            Hakan

            Show
            hakanküçükyılmaz Hakan Küçükyılmaz added a comment - Re: CREATE TABLE with unsupported table option keeps the option Sanja, do you have an update about this bug? Thanks, Hakan
            Hide
            serg Sergei Golubchik added a comment -

            Re: CREATE TABLE with unsupported table option keeps the option
            Additionally, the warning on TRANSACTIONAL uses an WARN_LEVEL_ERROR instead of WARN_LEVEL_WARN, as it should

            Show
            serg Sergei Golubchik added a comment - Re: CREATE TABLE with unsupported table option keeps the option Additionally, the warning on TRANSACTIONAL uses an WARN_LEVEL_ERROR instead of WARN_LEVEL_WARN, as it should
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 425916

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 425916
            Hide
            serg Sergei Golubchik added a comment -

            warning level for TRANSACTIONAL is fixed to be WARN_LEVEL_WARN

            Show
            serg Sergei Golubchik added a comment - warning level for TRANSACTIONAL is fixed to be WARN_LEVEL_WARN

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                psergey Sergei Petrunia
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: