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

Inconsistent error upon updating read-only table with ROW_FORMAT=COMPRESSED

    XMLWordPrintable

Details

    Description

      MTR test is at the end of the description.

      Command-line client version

      set global innodb_read_only_compressed= off;
      create table t (a int) row_format=compressed;
      insert into t values (1),(2),(3);
      set global innodb_read_only_compressed= on;
       
      insert into t values (4);
      show warnings;
      delete from t where a = 2;
      show warnings;
       
      drop table t;
      

      10.6 d317350a76

      MariaDB [db]> insert into t values (4);
      ERROR 4047 (HY000): InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
       
      MariaDB [db]> show warnings;
      +-------+------+------------------------------------------------------------------------------+
      | Level | Code | Message                                                                      |
      +-------+------+------------------------------------------------------------------------------+
      | Error | 4047 | InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. |
      | Error | 1036 | Table 't' is read only                                                       |
      +-------+------+------------------------------------------------------------------------------+
      2 rows in set (0.000 sec)
      

      MariaDB [db]> delete from t where a = 2;
      ERROR 1036 (HY000): Table 't' is read only
       
      MariaDB [db]> show warnings;
      +---------+------+------------------------------------------------------------------------------+
      | Level   | Code | Message                                                                      |
      +---------+------+------------------------------------------------------------------------------+
      | Warning | 4047 | InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. |
      | Error   | 1036 | Table 't' is read only                                                       |
      +---------+------+------------------------------------------------------------------------------+
      2 rows in set (0.000 sec)
      

      Note that for INSERT 4047 is an error, while for DELETE it's a warning.

      MTR version

      --source include/have_innodb.inc
       
      set global innodb_read_only_compressed= off;
      create table t (a int) engine=InnoDB row_format=compressed;
      insert into t values (1),(2),(3);
      set global innodb_read_only_compressed= on;
       
      --error ER_UNSUPPORTED_COMPRESSED_TABLE
      insert into t values (4);
      show warnings;
       
      --error ER_UNSUPPORTED_COMPRESSED_TABLE
      delete from t where a = 2;
      show warnings;
       
      # Cleanup 
      drop table t;
      

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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