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

Warnings inconsistently issued upon CHECK on table from older versions

Details

    Description

      Note: I'm fine with closing it as not a bug as long as all aspects of the new behavior are considered and confirmed to be expected. It was discussed a little on slack as a probably innocent consequence of MDEV-19292 fix, but I am not sure there was a final conclusion.

      Here is an example of the table:

      CREATE TABLE t1 (
        `c01` int(10) unsigned zerofill NOT NULL DEFAULT 0000000000,
        `c03` varchar(1024) NOT NULL DEFAULT '',
        `c04` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
        `c06` double(16,8) DEFAULT NULL COMMENT 'Percentage',
        `c07` date DEFAULT NULL,
        `c12` varchar(64) GENERATED ALWAYS AS (concat(`c09`,' ',`c10`)) VIRTUAL,
        `c05` longblob NOT NULL DEFAULT '',
        `c11` varchar(64) GENERATED ALWAYS AS (concat(`c09`,' ',`c10`)) PERSISTENT,
        `c08` text DEFAULT '',
        `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
        `c02` char(3) NOT NULL DEFAULT '',
        `c10` bigint(20) DEFAULT NULL COMMENT 'Y',
        `c09` bigint(20) DEFAULT NULL COMMENT 'X',
        PRIMARY KEY (`id`),
        UNIQUE KEY `idx1` (`c01`,`c02`),
        KEY `idx2` (`c05`(128))
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
      

      Server options: --innodb-compression-algorithm=none --innodb-page-size=4K, otherwise defaults.

      The table gets created on a pre-MDEV-19292 server with without any warnings (on a post-MDEV-19292 server it gets rejected).
      When a post-MDEV-19292 server starts on the old datadir, CHECK TABLE t1 produces the warning:

      10.2 fc77a66c

      +---------+-------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Table   | Op    | Msg_type | Msg_text                                                                                                                                                                                            |
      +---------+-------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | test.t1 | check | Warning  | Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. |
      | test.t1 | check | status   | OK                                                                                                                                                                                                  |
      +---------+-------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      

      First, it's unclear whether MDEV-19292 patch was supposed to affect REDUNDANT / COMPACT tables at all.

      Secondly, the warning, if it's true, could have been helpful if it was reliable; but it is only issued on the first opening of the table:

      MariaDB [test]> check table t1;
      +---------+-------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Table   | Op    | Msg_type | Msg_text                                                                                                                                                                                            |
      +---------+-------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | test.t1 | check | Warning  | Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. |
      | test.t1 | check | status   | OK                                                                                                                                                                                                  |
      +---------+-------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      2 rows in set (0.005 sec)
       
      MariaDB [test]> check table t1;
      +---------+-------+----------+----------+
      | Table   | Op    | Msg_type | Msg_text |
      +---------+-------+----------+----------+
      | test.t1 | check | status   | OK       |
      +---------+-------+----------+----------+
      1 row in set (0.005 sec)
      

      Which makes it fairly useless.

      And finally, the error log gets a different strange-looking warning instead:

      2019-07-28  0:57:51 140189814937344 [Warning] InnoDB: Cannot add field `c08` in table `test`.`t1` because after adding it, the row size is 2484 which is greater than maximum allowed size (1982) for a record on index leaf page.
      

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Priority Minor [ 4 ] Major [ 3 ]
            elenst Elena Stepanova made changes -
            Labels affects-tests
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            kevg Eugene Kosov (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            kevg Eugene Kosov (Inactive) made changes -
            Assignee Eugene Kosov [ kevg ] Marko Mäkelä [ marko ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            kevg Eugene Kosov (Inactive) made changes -
            Assignee Marko Mäkelä [ marko ] Eugene Kosov [ kevg ]
            kevg Eugene Kosov (Inactive) made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            kevg Eugene Kosov (Inactive) made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            kevg Eugene Kosov (Inactive) made changes -
            Assignee Eugene Kosov [ kevg ] Marko Mäkelä [ marko ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Eugene Kosov [ kevg ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            GeoffMontee Geoff Montee (Inactive) made changes -
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            julien.fritsch Julien Fritsch made changes -
            kevg Eugene Kosov (Inactive) made changes -
            julien.fritsch Julien Fritsch made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            GeoffMontee Geoff Montee (Inactive) made changes -
            marko Marko Mäkelä made changes -
            Labels affects-tests
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            julien.fritsch Julien Fritsch made changes -
            Priority Critical [ 2 ] Major [ 3 ]
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            julien.fritsch Julien Fritsch made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            GeoffMontee Geoff Montee (Inactive) made changes -
            marko Marko Mäkelä made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 98560 ] MariaDB v4 [ 143604 ]
            marko Marko Mäkelä made changes -
            Assignee Eugene Kosov [ kevg ] Thirunarayanan Balathandayuthapani [ thiru ]
            marko Marko Mäkelä made changes -
            thiru Thirunarayanan Balathandayuthapani made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Status In Progress [ 3 ] In Review [ 10002 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Assignee Thirunarayanan Balathandayuthapani [ thiru ] Marko Mäkelä [ marko ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Thirunarayanan Balathandayuthapani [ thiru ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Fix Version/s 10.3.35 [ 27512 ]
            Fix Version/s 10.4.25 [ 27510 ]
            Fix Version/s 10.5.16 [ 27508 ]
            Fix Version/s 10.6.8 [ 27506 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 147879 113644 118409 185863 160501 150204 114072 195104 198426 164062 166795 159353

            People

              thiru Thirunarayanan Balathandayuthapani
              elenst Elena Stepanova
              Votes:
              2 Vote for this issue
              Watchers:
              8 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.