4
--source include/have_partition.inc
6
let $engine_table= MYISAM;
7
let $engine_part= MYISAM;
8
let $engine_subpart= MYISAM;
14
--source suite/parts/inc/part_exch_tabs.inc
39
# 3) Invalid exchanges.
40
# Exchange of partition with table differing in structure.
41
CREATE TABLE t_11(a INT,b VARCHAR(55)) SELECT * FROM t_10;
42
--error ER_TABLES_DIFFERENT_METADATA
43
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_11;
45
DROP TABLE IF EXISTS t_11;
47
eval CREATE TABLE t_11(a INT,b CHAR(55),PRIMARY KEY(a)) ENGINE= $engine_table SELECT * FROM t_10;
48
--error ER_TABLES_DIFFERENT_METADATA
49
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_11;
51
DROP TABLE IF EXISTS t_11;
52
CREATE TABLE t_11(a INT,b VARCHAR(55),PRIMARY KEY(a)) ENGINE= MEMORY SELECT * FROM t_10;
53
--error ER_MIX_HANDLER_ERROR
54
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_11;
56
DROP TABLE IF EXISTS t_11;
58
# Exchange of partition with partitioned table.
59
eval CREATE TABLE t_11(a INT,b CHAR(55),PRIMARY KEY(a)) ENGINE= $engine_table
60
PARTITION BY KEY() AS SELECT * FROM t_10;
61
--error ER_PARTITION_EXCHANGE_PART_TABLE
62
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_11;
64
DROP TABLE IF EXISTS t_11;
66
# Exchange of subpartition with partitioned table.
67
--error ER_PARTITION_EXCHANGE_PART_TABLE
68
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE tsp;
69
# Exchange of subpartitioned partition with table.
70
--error ER_PARTITION_INSTEAD_OF_SUBPARTITION
71
ALTER TABLE tsp EXCHANGE PARTITION p0 WITH TABLE t_10;
72
# Exchange of values in partition not fitting the hash.
73
--error ER_ROW_DOES_NOT_MATCH_PARTITION
74
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_100;
75
# Exchange of values in subpartition not fitting the hash.
76
--error ER_ROW_DOES_NOT_MATCH_PARTITION
77
ALTER TABLE tp EXCHANGE PARTITION p2 WITH TABLE t_10;
79
--source suite/parts/inc/part_exch_drop_tabs.inc