From 4bbd56b6214226f5114e1c73d75f2851d63936c3 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Wed, 22 Nov 2023 15:32:41 +0800 Subject: [PATCH] *: support alter table row_format for the compatibility (#48769) close pingcap/tidb#48754 --- pkg/ddl/ddl_api.go | 1 + tests/integrationtest/r/util/admin.result | 2 +- tests/integrationtest/t/util/admin.test | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/ddl/ddl_api.go b/pkg/ddl/ddl_api.go index 2995daf1bf812..0c7738b6b0a21 100644 --- a/pkg/ddl/ddl_api.go +++ b/pkg/ddl/ddl_api.go @@ -3794,6 +3794,7 @@ func (d *ddl) AlterTable(ctx context.Context, sctx sessionctx.Context, stmt *ast Name: model.NewCIStr(opt.StrValue), } case ast.TableOptionEngine: + case ast.TableOptionRowFormat: case ast.TableOptionTTL, ast.TableOptionTTLEnable, ast.TableOptionTTLJobInterval: var ttlInfo *model.TTLInfo var ttlEnable *bool diff --git a/tests/integrationtest/r/util/admin.result b/tests/integrationtest/r/util/admin.result index 144578d8d295c..6903d3c1eb77e 100644 --- a/tests/integrationtest/r/util/admin.result +++ b/tests/integrationtest/r/util/admin.result @@ -9,7 +9,7 @@ ALTER TABLE t1 ADD COLUMN cc1 CHAR(36) NULL DEFAULT ''; ALTER TABLE t1 ADD COLUMN cc2 VARCHAR(36) NULL DEFAULT ''; ALTER TABLE t1 ADD INDEX idx1 (cc1); ALTER TABLE t1 ADD INDEX idx2 (cc2); -ALTER TABLE t1 engine=innodb; +ALTER TABLE t1 engine=innodb, ROW_FORMAT=DYNAMIC; admin check table t1; drop table if exists t1; create table t1 ( diff --git a/tests/integrationtest/t/util/admin.test b/tests/integrationtest/t/util/admin.test index 19afa81ef5131..984e65a8abb5c 100644 --- a/tests/integrationtest/t/util/admin.test +++ b/tests/integrationtest/t/util/admin.test @@ -10,7 +10,7 @@ ALTER TABLE t1 ADD COLUMN cc1 CHAR(36) NULL DEFAULT ''; ALTER TABLE t1 ADD COLUMN cc2 VARCHAR(36) NULL DEFAULT ''; ALTER TABLE t1 ADD INDEX idx1 (cc1); ALTER TABLE t1 ADD INDEX idx2 (cc2); -ALTER TABLE t1 engine=innodb; +ALTER TABLE t1 engine=innodb, ROW_FORMAT=DYNAMIC; admin check table t1; drop table if exists t1; create table t1 (