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

              People

              • Assignee:
                kevg Eugene Kosov
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: