Description:
We’re planning to use ARCHIVE storage engine to store archive data on separate media and servers. The choice is due to data compression and enough features to “unarchive” data if needed. Data size is obviously the main metric.
The idea is to avoid exporting to plain-text SQL files that take much more space. But it seems there’s no means to move ARCHIVE tables between servers:
* IMPORT TABLE only tries to find .MYD file
* creating an empty table on the target server and then replacing it with files from the source server doesn’t work either (maybe it does if the server gets restarted, but that’s not an option anyway).
How to repeat:
1) Create an ARCHIVE table and fill it with data.
2) Copy the data files: .ARZ and .SDI are found in the data directory.
If the target server is the same as the source:
3) Drop the table.
If the target server is NOT the same as the source, or the target database is another database on the same server:
3) Skip step 3.
4) Copy .ARZ file to the directory of the target database.
5) Copy .SDI file to the directory that is available for use in IMPORT TABLE (upload_dir).
6) Run IMPORT TABLE FROM 'upload_dir/TableName_XXX.sdi'
MySQL reports an error: table-named .MYD file not found.
Suggested fix:
I guess, allowing to import ARCHIVE tables is a feature that might make the storage engine much more useful for more use cases. And, due to simplicity of the storage engine, the implementation shouldn’t be too difficult.