[MDEV-12422] CONNECT Engine to support CHECK TABLE Created: 2017-04-01  Updated: 2018-10-15  Resolved: 2018-10-15

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Connect
Fix Version/s: 10.0.37, 10.3.11, 10.1.37, 10.2.19

Type: Task Priority: Minor
Reporter: Robert Dyas Assignee: Olivier Bertrand
Resolution: Fixed Votes: 0
Labels: None


 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.



 Comments   
Comment by Robert Dyas [ 2017-05-26 ]

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.

Comment by Olivier Bertrand [ 2017-05-29 ]

Does nothing but no error return anymore.

Comment by Robert Dyas [ 2017-06-04 ]

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]> 

Comment by Olivier Bertrand [ 2017-06-04 ]

Normal, version 10.1.24 does not include the fix.

Comment by Robert Dyas [ 2017-06-05 ]

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

Comment by Robert Dyas [ 2017-08-19 ]

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?

Comment by Olivier Bertrand [ 2017-08-20 ]

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.

Comment by Olivier Bertrand [ 2018-10-15 ]

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

Generated at Thu Feb 08 07:57:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.