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

CONNECT Engine to support CHECK TABLE

Details

    Description

      This is a feature request. It would be great if CONNECT Engine would not return an error when CHECK TABLE is run.

      The problem is that when running mysqlcheck from the command line with the --all-databases option and lots of tables it would be great to only get reports of actual errors; right now all CONNECT Engine tables flag as an error because the command is unsupported. It would be ideal if CHECK TABLE against a CONNECT table would perform at least minimal consistency checks and return OK if all looks correct.

      Attachments

        Activity

          rdyas Robert Dyas added a comment -

          Just for more context: even a minimal implementation where is does not generate an error but says OK would be good enough for our uses currently. Since CONNECT tables are by definition not the master source of the data, then they could be considered OK by default.

          rdyas Robert Dyas added a comment - Just for more context: even a minimal implementation where is does not generate an error but says OK would be good enough for our uses currently. Since CONNECT tables are by definition not the master source of the data, then they could be considered OK by default.

          Does nothing but no error return anymore.

          bertrandop Olivier Bertrand added a comment - Does nothing but no error return anymore.
          rdyas Robert Dyas added a comment -

          In 10.1.24 check table still returns an error:

          MariaDB [db11003]> check table jdbcpool_mysql_Clients                          
              -> ;
          +--------------------------------+-------+----------+----------------------------------------------------------+
          | Table                          | Op    | Msg_type | Msg_text                                                 |
          +--------------------------------+-------+----------+----------------------------------------------------------+
          | db11003.jdbcpool_mysql_Clients | check | Error    | CONNECT Unsupported command                              |
          | db11003.jdbcpool_mysql_Clients | check | Error    | Got error 122 'CONNECT Unsupported command' from CONNECT |
          | db11003.jdbcpool_mysql_Clients | check | error    | Corrupt                                                  |
          +--------------------------------+-------+----------+----------------------------------------------------------+
          3 rows in set (0.00 sec)
          MariaDB [db11003]> select version();
          +-----------------+
          | version()       |
          +-----------------+
          | 10.1.24-MariaDB |
          +-----------------+
          1 row in set (0.00 sec)
          MariaDB [db11003]> 
          

          rdyas Robert Dyas added a comment - In 10.1.24 check table still returns an error: MariaDB [db11003]> check table jdbcpool_mysql_Clients -> ; +--------------------------------+-------+----------+----------------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +--------------------------------+-------+----------+----------------------------------------------------------+ | db11003.jdbcpool_mysql_Clients | check | Error | CONNECT Unsupported command | | db11003.jdbcpool_mysql_Clients | check | Error | Got error 122 'CONNECT Unsupported command' from CONNECT | | db11003.jdbcpool_mysql_Clients | check | error | Corrupt | +--------------------------------+-------+----------+----------------------------------------------------------+ 3 rows in set (0.00 sec) MariaDB [db11003]> select version(); +-----------------+ | version() | +-----------------+ | 10.1.24-MariaDB | +-----------------+ 1 row in set (0.00 sec) MariaDB [db11003]>

          Normal, version 10.1.24 does not include the fix.

          bertrandop Olivier Bertrand added a comment - Normal, version 10.1.24 does not include the fix.
          rdyas Robert Dyas added a comment -

          Olivier - could you take a look at MDEV-12973 ?
          It has been unassigned for several days.

          rdyas Robert Dyas added a comment - Olivier - could you take a look at MDEV-12973 ? It has been unassigned for several days.
          rdyas Robert Dyas added a comment -

          I just tried the following command with 10.1.26 ...

          mysqlcheck --user=root -p  --all-databases
          

          and it still produces this error just like before:

          db11003.Azure_test_Nvarchar_type
          Error    : CONNECT Unsupported command
          Error    : Got error 122 'CONNECT Unsupported command' from CONNECT
          error    : Corrupt
          

          Did this change not get complied in or is there some other issue?

          rdyas Robert Dyas added a comment - I just tried the following command with 10.1.26 ... mysqlcheck --user=root -p --all-databases and it still produces this error just like before: db11003.Azure_test_Nvarchar_type Error : CONNECT Unsupported command Error : Got error 122 'CONNECT Unsupported command' from CONNECT error : Corrupt Did this change not get complied in or is there some other issue?
          bertrandop Olivier Bertrand added a comment - - edited

          Indeed there was another issue: the check function was not implemented.
          Now it returns HA_ADMIN_OK but does nothing yet.
          Revisiting this case I found the above is wrong. The error was due to another reason that does not exists anymore in new versions of MariaDB.
          The default handler implementation returns HA_ADMIN_NOT_IMPLEMENTED and this is alright (no corrupt message)
          Therefore I suppressed the check function implementation from CONNECT and instead of returning OK, which was somewhat misleading, it now returns "The storage engine for the table doesn't support check".
          Note that this also apply to REPAIR and ANALYZE.

          bertrandop Olivier Bertrand added a comment - - edited Indeed there was another issue: the check function was not implemented. Now it returns HA_ADMIN_OK but does nothing yet. Revisiting this case I found the above is wrong. The error was due to another reason that does not exists anymore in new versions of MariaDB. The default handler implementation returns HA_ADMIN_NOT_IMPLEMENTED and this is alright (no corrupt message) Therefore I suppressed the check function implementation from CONNECT and instead of returning OK, which was somewhat misleading, it now returns "The storage engine for the table doesn't support check". Note that this also apply to REPAIR and ANALYZE.

          New versions of CONNECT now support a somewhat simplistic version of CHECK TABLE.

          bertrandop Olivier Bertrand added a comment - New versions of CONNECT now support a somewhat simplistic version of CHECK TABLE.

          People

            bertrandop Olivier Bertrand
            rdyas Robert Dyas
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.