Details
Description
--source include/have_partition.inc
|
|
CREATE TABLE t1 (a INT) PARTITION BY HASH(a); |
CREATE TABLE t2 (a INT); |
CREATE VIEW v AS SELECT * FROM t1; |
ALTER TABLE v EXCHANGE PARTITION p0 WITH TABLE t2; |
|
# Cleanup
|
DROP VIEW v; |
DROP TABLE t1, t2; |
10.3 3e564d46 |
mysqltest: At line 6: query 'ALTER TABLE v EXCHANGE PARTITION p0 WITH TABLE t2' failed: 1177: Can't open table |
An error is of course expected, but in other similar situations it would be
mysqltest: At line 6: query 'ALTER TABLE v PARTITION BY HASH(a)' failed: 1347: 'test.v' is not of type 'BASE TABLE' |
ER_CHECK_NO_SUCH_TABLE "Can't open table" is misleading as it hints at table corruption.
Also reproducible on MySQL 5.7, 8.0.