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

Support mariadb-check and CHECK TABLE with SEQUENCE

    XMLWordPrintable

Details

    Description

      SEQUENCE is based on Storage engine like InnoDB or MyISAM but CHECK TABLE or mysqlcheck fail/not supported for such sequence.

      MariaDB [test]> show create sequence a;
      +-------+--------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                             |
      +-------+--------------------------------------------------------------------------------------------------------------------------+
      | a     | CREATE SEQUENCE `a` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB |
      +-------+--------------------------------------------------------------------------------------------------------------------------+
       

       
      MariaDB [test]> show create sequence b;
      +-------+--------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                             |
      +-------+--------------------------------------------------------------------------------------------------------------------------+
      | b     | CREATE SEQUENCE `b` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=MyISAM |
      +-------+--------------------------------------------------------------------------------------------------------------------------+
      
      

      MariaDB [test]> select TABLE_NAME, TABLE_TYPE , ENGINE  from information_schema.tables where table_schema='test';
      +------------+------------+--------+
      | TABLE_NAME | TABLE_TYPE | ENGINE |
      +------------+------------+--------+
      | a          | SEQUENCE   | InnoDB |
      | t1         | BASE TABLE | InnoDB |
      | b          | SEQUENCE   | MyISAM |
      | t2         | BASE TABLE | MyISAM |
      +------------+------------+--------+
       
       
      MariaDB [test]> check table a;
      +--------+-------+----------+--------------------------------------------------------+
      | Table  | Op    | Msg_type | Msg_text                                               |
      +--------+-------+----------+--------------------------------------------------------+
      | test.a | check | note     | The storage engine for the table doesn't support check |
      +--------+-------+----------+--------------------------------------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> check table b;
      +--------+-------+----------+--------------------------------------------------------+
      | Table  | Op    | Msg_type | Msg_text                                               |
      +--------+-------+----------+--------------------------------------------------------+
      | test.b | check | note     | The storage engine for the table doesn't support check |
      +--------+-------+----------+--------------------------------------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> check table t1;
      +---------+-------+----------+----------+
      | Table   | Op    | Msg_type | Msg_text |
      +---------+-------+----------+----------+
      | test.t1 | check | status   | OK       |
      +---------+-------+----------+----------+
      1 row in set (0.001 sec)
       
      MariaDB [test]> check table t2;
      +---------+-------+----------+----------+
      | Table   | Op    | Msg_type | Msg_text |
      +---------+-------+----------+----------+
      | test.t2 | check | status   | OK       |
      +---------+-------+----------+----------+
      1 row in set (0.001 sec)
       
       
      [root@master_node_01 test]# mysqlcheck --databases test
      test.a
      note     : The storage engine for the table doesn't support check
      test.b
      note     : The storage engine for the table doesn't support check
      test.t1                                            OK
      test.t2                                            OK
      
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              pramod.mahto@mariadb.com Pramod Mahto
              Votes:
              1 Vote for this issue
              Watchers:
              12 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.