Skip to content

Commit

Permalink
fix test for CREATE DATABASE;
Browse files Browse the repository at this point in the history
  • Loading branch information
lance6716 committed Jun 24, 2022
1 parent e8cdfe8 commit 99f40ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ddl/ddl_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ func (d *ddl) CreateSchemaWithInfo(

err = d.DoDDLJob(ctx, job)
err = d.callHookOnChanged(job, err)

if infoschema.ErrDatabaseExists.Equal(err) && onExist == OnExistIgnore {
ctx.GetSessionVars().StmtCtx.AppendNote(err)
return nil
}

return errors.Trace(err)
}

Expand Down

0 comments on commit 99f40ae

Please sign in to comment.