Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Won't Fix
-
10.0.4
-
None
Description
The following test fails with error "ERROR HY000: Tables have different definitions":
--source include/have_partition.inc
|
--source include/have_archive.inc
|
|
CREATE TABLE t1(a INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=ARCHIVE PARTITION BY HASH (a) PARTITIONS 4; |
CREATE TABLE t2 LIKE t1; |
ALTER TABLE t2 REMOVE PARTITIONING; |
ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2; |
DROP TABLE t1,t2; |
While performing exchange partition we call mysql_compare_tables()/ha_archive::check_if_incompatible_data(). In MariaDB this function always return COMPATIBLE_DATA_NO.
Covered by the following tests: parts.partition_mgm_lc1_archive parts.partition_exchange_archive parts.partition_mgm_lc0_archive rpl.rpl_partition_archive. Enable them when this bug is fixed.
Attachments
Issue Links
- relates to
-
MDEV-4864 Merge tests for EXCHANGE PARTITION feature
-
- Closed
-
Activity
Fix Version/s | 10.0.7 [ 14100 ] | |
Fix Version/s | 10.0.6 [ 13202 ] |
Description |
The following test fails with error "ERROR HY000: Tables have different definitions": --source include/have_partition.inc --source include/have_archive.inc CREATE TABLE t1(a INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=ARCHIVE PARTITION BY HASH (a) PARTITIONS 4; CREATE TABLE t2 LIKE t1; ALTER TABLE t2 REMOVE PARTITIONING; ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2; DROP TABLE t1,t2; While performing exchange partition we call mysql_compare_tables()/ha_archive::check_if_incompatible_data(). In MariaDB this function always return COMPATIBLE_DATA_NO. Covered by the following tests: parts.partition_mgm_lc1_archive parts.partition_exchange_archive parts.partition_mgm_lc0_archive rpl.rpl_partition_archive. Enable them when this bug is fixed. |
The following test fails with error "ERROR HY000: Tables have different definitions": {code:sql} --source include/have_partition.inc --source include/have_archive.inc CREATE TABLE t1(a INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=ARCHIVE PARTITION BY HASH (a) PARTITIONS 4; CREATE TABLE t2 LIKE t1; ALTER TABLE t2 REMOVE PARTITIONING; ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2; DROP TABLE t1,t2; {code} While performing exchange partition we call mysql_compare_tables()/ha_archive::check_if_incompatible_data(). In MariaDB this function always return COMPATIBLE_DATA_NO. Covered by the following tests: parts.partition_mgm_lc1_archive parts.partition_exchange_archive parts.partition_mgm_lc0_archive rpl.rpl_partition_archive. Enable them when this bug is fixed. |
Assignee | Sergey Vojtovich [ svoj ] | Sergei Golubchik [ serg ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Fix Version/s | 10.0.8 [ 14200 ] | |
Fix Version/s | 10.0.7 [ 14100 ] |
Priority | Major [ 3 ] | Minor [ 4 ] |
Fix Version/s | 10.0.9 [ 14400 ] | |
Fix Version/s | 10.0.8 [ 14200 ] |
Fix Version/s | 10.0.10 [ 14500 ] | |
Fix Version/s | 10.0.9 [ 14400 ] |
Fix Version/s | 10.0.11 [ 15200 ] | |
Fix Version/s | 10.0.10 [ 14500 ] |
Fix Version/s | 10.0.12 [ 15201 ] | |
Fix Version/s | 10.0.11 [ 15200 ] |
Workflow | defaullt [ 29126 ] | MariaDB v2 [ 42547 ] |
Fix Version/s | 10.0.13 [ 16000 ] | |
Fix Version/s | 10.0.12 [ 15201 ] |
Workflow | MariaDB v2 [ 42547 ] | MariaDB v3 [ 63703 ] |
Workflow | MariaDB v3 [ 63703 ] | MariaDB v4 [ 143426 ] |
Fix Version/s | 10.0 [ 16000 ] |
Component/s | OTHER [ 10125 ] | |
Fix Version/s | N/A [ 14700 ] | |
Resolution | Won't Fix [ 2 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
It's easy to fix ha_archive::check_if_incompatible_data():
enum_alter_inplace_result check_if_supported_inplace_alter(TABLE *, Alter_inplace_info *);
{ return HA_ALTER_INPLACE_NOT_SUPPORTED; }bool check_if_incompatible_data(HA_CREATE_INFO *, uint)
{ return COMPATIBLE_DATA_YES; }this will make mysql_compare_tables() to work, while still disabling frm-only ALTER TABLE.
But ALTER TABLE .. EXCHANGE PARTITION still won't work — it's conceptually incompatible with Archive engine. ALTER TABLE .. EXCHANGE PARTITION essentially swap ARZ file of the specified partition and the ARZ file of the specified table. Without touching frm files. Because Archive stores a copy of the frm in the ARZ file, they go out of sync, and the next time the table is opened, Archive will notice it. Other engines that do frm shipping could, perhaps, update the stored frm copy on rename. But Archive keeps frm in the header of the ARZ file, it would need to re-compress the complete ARZ file to replace the stored frm image.