Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Jan 23, 2024
1 parent c36f79b commit 05678d8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
7 changes: 0 additions & 7 deletions server/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -756,16 +756,9 @@ func TestConnExecutionTimeout(t *testing.T) {
require.NoError(t, err)

err = cc.handleQuery(context.Background(), "select /*+ MAX_EXECUTION_TIME(100)*/ * FROM testTable2 WHERE SLEEP(1);")
<<<<<<< HEAD:server/conn_test.go
require.NoError(t, err)

=======
require.Equal(t, "[executor:3024]Query execution was interrupted, maximum statement execution time exceeded", err.Error())
err = cc.handleQuery(context.Background(), "select /*+ set_var(max_execution_time=100) */ age, sleep(1) from testTable2 union all select age, 1 from testTable2")
require.Equal(t, "[executor:3024]Query execution was interrupted, maximum statement execution time exceeded", err.Error())
// Killed because of max execution time, reset Killed to 0.
tk.Session().GetSessionVars().SQLKiller.SendKillSignal(sqlkiller.MaxExecTimeExceeded)
>>>>>>> 62c83d40fe2 (bindinfo: extract the table hint from the union statement (#50070)):pkg/server/conn_test.go
tk.MustExec("set @@max_execution_time = 500;")

err = cc.handleQuery(context.Background(), "alter table testTable2 add index idx(age);")
Expand Down
3 changes: 0 additions & 3 deletions util/hint/hint_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,8 @@ func ExtractTableHintsFromStmtNode(node ast.Node, sctx sessionctx.Context) []*as
// check duplicated hints
checkInsertStmtHintDuplicated(node, sctx)
return x.TableHints
<<<<<<< HEAD:util/hint/hint_processor.go
case *ast.ExplainStmt:
return ExtractTableHintsFromStmtNode(x.Stmt, sctx)
=======
case *ast.SetOprStmt:
var result []*ast.TableOptimizerHint
if x.SelectList == nil {
Expand All @@ -104,7 +102,6 @@ func ExtractTableHintsFromStmtNode(node ast.Node, sctx sessionctx.Context) []*as
}
}
return result
>>>>>>> 62c83d40fe2 (bindinfo: extract the table hint from the union statement (#50070)):pkg/util/hint/hint_processor.go
default:
return nil
}
Expand Down

0 comments on commit 05678d8

Please sign in to comment.