Skip to content

Commit

Permalink
remove unrelated
Browse files Browse the repository at this point in the history
Signed-off-by: lihaowei <[email protected]>
  • Loading branch information
Howie59 committed Jun 2, 2021
1 parent d111ae4 commit 88802e6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
7 changes: 0 additions & 7 deletions ddl/serial_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,13 +534,6 @@ func (s *testSerialSuite) TestCreateTableWithLike(c *C) {
_, err = tk.Exec("create table temporary_table_t1 like temporary_table")
c.Assert(err.Error(), Equals, core.ErrOptOnTemporaryTable.GenWithStackByArgs("create table like").Error())
tk.MustExec("drop table if exists temporary_table;")

tk.MustExec("drop table if exists temporary_table_like;")
tk.MustExec("create table temporary_table (a int, b int,index(a))")
tk.MustExec("drop table if exists temporary_table_like_t1;")
_, err = tk.Exec("create global temporary table temporary_table_like_t1 like temporary_table on commit delete rows;")
c.Assert(err.Error(), Equals, core.ErrOptOnTemporaryTable.GenWithStackByArgs("create table like").Error())
tk.MustExec("drop table if exists temporary_table_like;")
}

// TestCancelAddIndex1 tests canceling ddl job when the add index worker is not started.
Expand Down
3 changes: 0 additions & 3 deletions planner/core/planbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -3480,9 +3480,6 @@ func (b *PlanBuilder) buildDDL(ctx context.Context, node ast.DDLNode) (Plan, err
return nil, infoschema.ErrCannotAddForeign
}
}
if v.ReferTable != nil {
return nil, ErrOptOnTemporaryTable.GenWithStackByArgs("create table like")
}
}
if b.ctx.GetSessionVars().User != nil {
authErr = ErrTableaccessDenied.GenWithStackByArgs("CREATE", b.ctx.GetSessionVars().User.AuthUsername,
Expand Down

0 comments on commit 88802e6

Please sign in to comment.