[MDEV-6093] CHECK reports 'Corrupt' with CONNECT Created: 2014-04-14 Updated: 2020-07-29 Resolved: 2020-07-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | 10.0.10 |
| Fix Version/s: | 10.4.12, 10.1.45, 10.2.32, 10.3.23, 10.5.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Federico Razzoli | Assignee: | Olivier Bertrand |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Description |
|
Some administrative commands report corruption for CONNECT tables:
For example:
I understand that they are not supported. The problem is with the last row. If you want a program to verify whether a table is corrupted, you issue CHECK TABLE and look if the last returned row has Msg_type='error' and Msg_text='Corrupt'. You do the same if you want the program to try a REPAIR and check if it succeeds. It would be nice if CONNECT could avoid returning that row. |
| Comments |
| Comment by Federico Razzoli [ 2014-04-14 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
For example, if it could do something like this (InnoDB), it would be perfect:
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-04-14 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
CHECKSUM returns the first two, but not 'Corrupt'.
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2014-04-15 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Here is what I get with the last version of CONNECT:
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 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. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2017-01-26 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Also reports this for mysql_upgrade: db1.t1 | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2020-07-29 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Reopening this report, I found that this had been fixed. Why not closed yet? Perhaps because it was not tested on all cases and platforms. Anyway I close it and reopen it if it fais again. |