Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
Signed-off-by: lihaowei <[email protected]>
  • Loading branch information
Howie59 committed May 11, 2021
1 parent e09562d commit 3f0efea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion executor/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (e *DDLExec) dropTableObject(objects []*ast.TableName, obt objectType, ifEx
return err
}
tempTableType := tableInfo.Meta().TempTableType
if obt == tableObject && config.CheckTableBeforeDrop && tempTableType != model.TempTableGlobal && tempTableType != model.TempTableLocal {
if obt == tableObject && config.CheckTableBeforeDrop && tempTableType == model.TempTableNone {
logutil.BgLogger().Warn("admin check table before drop",
zap.String("database", fullti.Schema.O),
zap.String("table", fullti.Name.O),
Expand Down
2 changes: 2 additions & 0 deletions expression/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9161,8 +9161,10 @@ func (s *testIntegrationSuite) TestIssue24429(c *C) {

tk.MustExec("set @@sql_mode = ANSI_QUOTES;")
tk.MustExec("use test")
tk.MustExec("drop table if exists t;")
tk.MustExec("create table t (a int);")
tk.MustQuery(`select t."a"=10 from t;`).Check(testkit.Rows())
tk.MustExec("drop table if exists t;")
}

func (s *testIntegrationSuite) TestVitessHash(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion planner/core/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ func (p *preprocessor) checkAdminCheckTableGrammar(stmt *ast.AdminStmt) {
return
}
tempTableType := tableInfo.Meta().TempTableType
if stmt.Tp == ast.AdminCheckTable && (tempTableType == model.TempTableGlobal || tempTableType == model.TempTableLocal) {
if stmt.Tp == ast.AdminCheckTable && tempTableType != model.TempTableNone {
p.err = infoschema.ErrAdminCheckTable
return
}
Expand Down

0 comments on commit 3f0efea

Please sign in to comment.