Details
-
Bug
-
Status: In Progress (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11.7
Description
When exchanging partitions in 10.11.7 it throws `ERROR 1736 (HY000): Tables have different definitions`, even if they are identical. The only factor that i can see to determine when it works and when it doesn't is whether the column expression references another column. This works fine in 10.11.6 and this is a very frequent operation for us. We create a working table for a new version of the data for a partition, then swap it in after it has been generated.
I suspect it is a result of MDEV-28127
examples:
-- this fails when the virtual persistent column
|
-- references another column
|
create or replace table t1( |
id int primary key, |
col1 int, |
col2 boolean as (col1 is null)) |
partition by list (id) ( partition p1 values in (1) |
);
|
|
create or replace table t1_working like t1; |
|
alter table t1_working remove partitioning; |
|
alter table t1 exchange partition p1 with table t1_working; |
|
-- this works when the virtual persistent column
|
-- does not reference another column
|
create or replace table t2( |
id int primary key, |
col1 int, |
col2 boolean as (true)) |
partition by list (id) ( partition p1 values in (1) |
);
|
|
create or replace table t2_working like t2; |
|
alter table t2_working remove partitioning; |
|
alter table t2 exchange partition p1 with table t2_working; |
Attachments
Issue Links
- is caused by
-
MDEV-28127 EXCHANGE PARTITION with non-matching vcol expression segfault
- Closed
- relates to
-
MDEV-35612 EXCHANGE PARTITION does not work for tables with unique blobs
- In Review