Here is what I get with the last version of CONNECT:
MariaDB [connect]> CHECK TABLE employe;
+-----------------+-------+----------+------------------------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------+-------+----------+------------------------------------------------------------------------+
| connect.employe | check | Error | CONNECT Unsupported command |
| connect.employe | check | Error | Can't lock file (errno: 122 "Internal (unspecified) error in handler") |
| connect.employe | check | error | Corrupt |
+-----------------+-------+----------+------------------------------------------------------------------------+
3 rows in set (0.08 sec)
MariaDB [connect]> REPAIR TABLE employe;
+-----------------+--------+----------+------------------------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------+--------+----------+------------------------------------------------------------------------+
| connect.employe | repair | Error | CONNECT Unsupported command |
| connect.employe | repair | Error | Can't lock file (errno: 122 "Internal (unspecified) error in handler") |
| connect.employe | repair | error | Corrupt |
+-----------------+--------+----------+------------------------------------------------------------------------+
3 rows in set (0.00 sec)
MariaDB [connect]> ANALYZE TABLE employe;
+-----------------+---------+----------+------------------------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------+---------+----------+------------------------------------------------------------------------+
| connect.employe | analyze | Error | CONNECT Unsupported command |
| connect.employe | analyze | Error | Can't lock file (errno: 122 "Internal (unspecified) error in handler") |
| connect.employe | analyze | error | Corrupt |
+-----------------+---------+----------+------------------------------------------------------------------------+
3 rows in set (0.00 sec)
MariaDB [connect]> OPTIMIZE TABLE employe;
+-----------------+----------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------+----------+----------+----------+
| connect.employe | optimize | status | OK |
+-----------------+----------+----------+----------+
1 row in set (0.05 sec)
MariaDB [connect]> CHECKSUM TABLE employe;
+-----------------+----------+
| Table | Checksum |
+-----------------+----------+
| connect.employe | NULL |
+-----------------+----------+
1 row in set, 2 warnings (0.08 sec)
The problem is complex. CONNECT works by treating each query as a separate entity. For this, it needs to know when a new query begins. There are two functions that mark the start of new query for a table:
1 - external_lock: called when the table is not locked
2 - start_stmt: called when the table is locked
Therefore CONNECT does all query initialization and termination work in external_lock (most of the time) in particular checks whether the command is supported or not supported. When a command is not supported CONNECT prepares the message "CONNECT Unsupported command" and returns HA_ERR_INTERNAL_ERROR.
What happens next is MariaDB processing. The message "Can't lock file" comes from CONNECT doing things in external_lock that are not related to locking. I don't know where the "Corrupt" message comes from.
This shows that some plugins, in particular CONNECT, need a true function call at the beginning of each new query. The start_stmt function would be all right if unconditionally called.
For example, if it could do something like this (InnoDB), it would be perfect: