From a24d8ac236c72fd9d57f2729f5ddc7b7cf492e92 Mon Sep 17 00:00:00 2001 From: ystaticy Date: Thu, 29 Dec 2022 15:38:17 +0800 Subject: [PATCH] hotfix create view ddl (#185) --- ddl/table.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ddl/table.go b/ddl/table.go index df329fd973c06..23a503e525156 100644 --- a/ddl/table.go +++ b/ddl/table.go @@ -301,6 +301,7 @@ func onCreateView(d *ddlCtx, t *meta.Meta, job *model.Job) (ver int64, _ error) if oldTbInfoID > 0 && orReplace { err = t.DropTableOrView(schemaID, oldTbInfoID) if err != nil { + job.State = model.JobStateCancelled return ver, errors.Trace(err) } err = t.GetAutoIDAccessors(schemaID, oldTbInfoID).Del()