Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.11, 10.3(EOL), 10.4(EOL), 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 11.0(EOL)
-
None
Description
If ALTER is performed with COPY algorithm (explicitly or implicitly) on a CONNECT table with (potentially) multiple underlying files, the contents of the underlying file gets duplicated.
Maybe it would be happening for non-multiple tables too, but MDEV-30909 (COPY algorithm is not supported) doesn't allow to check it.
INSTALL SONAME 'ha_connect'; |
|
let $MYSQLD_DATADIR= `select @@datadir`; |
|
--write_file $MYSQLD_DATADIR/test/num1.csv
|
1
|
2
|
EOF
|
|
CREATE TABLE t (a int NOT NULL) ENGINE=CONNECT TABLE_TYPE=CSV FILE_NAME='num?.csv' MULTIPLE=1; |
SELECT * FROM t; |
ALTER TABLE t FORCE; |
SELECT * FROM t; |
|
ALTER TABLE t FORCE, ALGORITHM=COPY; |
SELECT * FROM t; |
|
--echo # File contents
|
--cat_file $MYSQLD_DATADIR/test/num1.csv
|
|
# Cleanup
|
DROP TABLE t; |
UNINSTALL SONAME 'ha_connect'; |
10.4 ff3d4395 |
ALTER TABLE t FORCE; |
Warnings:
|
Warning 1105 This is an outward table, table data were not modified. |
SELECT * FROM t; |
a
|
1
|
2
|
ALTER TABLE t FORCE, ALGORITHM=COPY; |
SELECT * FROM t; |
a
|
1
|
2
|
1
|
2
|
# File contents
|
1
|
2
|
1
|
2
|