[MDEV-30909] COPY alter algorithm is not supported for some CONNECT tables Created: 2023-03-22  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Storage Engine - Connect
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Andrew Hutchings
Resolution: Unresolved Votes: 0
Labels: None


 Description   

According to the documentation, COPY algorithm is supposed to be universal for all engines, even though slow. CONNECT engine (with some table types) appears to be an exception.

INSTALL SONAME 'ha_connect';
 
CREATE TABLE t (fname VARCHAR(8) NOT NULL, ftype VARCHAR(8) NOT NULL) ENGINE=CONNECT TABLE_TYPE=DIR FILE_NAME='tf';
ALTER TABLE t FILE_NAME='tf2', ALGORITHM=COPY;
 
# Cleanup
DROP TABLE t;
UNINSTALL SONAME 'ha_connect';

10.4 ff3d4395

mysqltest: At line 4: query 'ALTER TABLE t FILE_NAME='tf2', ALGORITHM=COPY' failed: 1105: Operation denied. Table data would be modified.



 Comments   
Comment by Sergei Golubchik [ 2023-08-04 ]

I'd suggest to use HA_NO_COPY_ON_ALTER here, but it'd require a non-trivial refactoring in mysql_alter_table()

Generated at Thu Feb 08 10:19:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.