Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parition table can not change decimal type #57780

Open
lizhenhuan opened this issue Nov 28, 2024 · 1 comment
Open

parition table can not change decimal type #57780

lizhenhuan opened this issue Nov 28, 2024 · 1 comment
Labels
component/tablepartition This issue is related to Table Partition of TiDB. sig/sql-infra SIG: SQL Infra type/enhancement The issue or PR belongs to an enhancement.

Comments

@lizhenhuan
Copy link
Contributor

lizhenhuan commented Nov 28, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table :

CREATE TABLE `cis_assay_report_detail` (
  `org_code` varchar(9) NOT NULL ,
  `branch_code` varchar(2) NOT NULL DEFAULT '00' ,
  `report_no` varchar(20) NOT NULL ,
  `report_seqno` varchar(22) NOT NULL ,
  `report_seq` varchar(22) NOT NULL ,
  `reg_id` varchar(22) DEFAULT NULL ,
  report_time datetime,
  `modify_empid` varchar(10) DEFAULT NULL ,
  `modify_empid_code_org` varchar(64) DEFAULT NULL ,
  `modify_empid_name_org` varchar(256) DEFAULT NULL ,
  `create_time_sys` timestamp(6) DEFAULT CURRENT_TIMESTAMP(6) ,
  `create_empid` varchar(10) DEFAULT NULL ,
  `create_empid_code_org` varchar(64) DEFAULT NULL ,
  `create_empid_name_org` varchar(256) DEFAULT NULL ,
  `modify_time_mfs` datetime DEFAULT NULL ,
  `create_time_mfs` datetime DEFAULT NULL ,
  `batch_version` varchar(40) DEFAULT NULL ,
  `batch_type` varchar(10) DEFAULT NULL ,
  `time_correlation_mark` varchar(2) NOT NULL DEFAULT '0' ,
  `modify_time_center` timestamp(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) ,
  `create_time_center` timestamp(6) DEFAULT CURRENT_TIMESTAMP(6) ,
  PRIMARY KEY (`report_time`,`org_code`,`branch_code`,`report_no`,`report_seqno`,`report_seq`) /*T![clustered_index] NONCLUSTERED */
  
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin 
PARTITION BY RANGE COLUMNS(`report_time`)
(PARTITION `p201001` VALUES LESS THAN ('2010-02-01 00:00:00'),
 PARTITION `p201002` VALUES LESS THAN ('2010-03-01 00:00:00'),
 PARTITION `p201003` VALUES LESS THAN ('2010-04-01 00:00:00'),
 PARTITION `p201004` VALUES LESS THAN ('2010-05-01 00:00:00'),
 PARTITION `p201005` VALUES LESS THAN ('2010-06-01 00:00:00'),
 PARTITION `pmax` VALUES LESS THAN (MAXVALUE))

alter table cis_assay_report_detail change column limit_lower limit_lower varchar(64);
Query OK, 0 rows affected (0.06 sec)

mysql> alter table cis_assay_report_detail add column test_decimal decimal(9,2);
Query OK, 0 rows affected (0.17 sec)

mysql> alter table cis_assay_report_detail change column test_decimal test_decimal decimal(11,2);
ERROR 8200 (HY000): Unsupported modify column: table is partition table

It works on normal table

create table t (test_decimal decimal(9,2));
Query OK, 0 rows affected (0.05 sec)

mysql> alter table t change column test_decimal test_decimal decimal(11,2);
Query OK, 0 rows affected (0.19 sec)

2. What did you expect to see? (Required)

alter table cis_assay_report_detail change column test_decimal test_decimal decimal(11,2);
execute success

3. What did you see instead (Required)

alter table cis_assay_report_detail change column test_decimal test_decimal decimal(11,2);
ERROR 8200 (HY000): Unsupported modify column: table is partition table

4. What is your TiDB version? (Required)

tidb 8.4

@lizhenhuan lizhenhuan added the type/bug The issue is confirmed as a bug. label Nov 28, 2024
@jebter jebter added sig/sql-infra SIG: SQL Infra severity/major component/tablepartition This issue is related to Table Partition of TiDB. labels Nov 29, 2024
@mjonss
Copy link
Contributor

mjonss commented Dec 6, 2024

Related to #38297, should be fixed by #40634.

@Defined2014 Defined2014 added type/enhancement The issue or PR belongs to an enhancement. and removed type/bug The issue is confirmed as a bug. severity/major may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 may-affects-8.5 labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tablepartition This issue is related to Table Partition of TiDB. sig/sql-infra SIG: SQL Infra type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

4 participants