Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
BugsGuru committed Jan 24, 2025
1 parent 17418ce commit f9f9ae2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions sqle/driver/mysql/session/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,10 @@ func (c *Context) GetExecutionPlan(sql string) ([]*executor.ExplainRecord, error
return ep.Plan, nil
}

if c.e == nil {
return nil, nil
}

r, err := c.fetchExecutionPlanWithWarnings(sql)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion sqle/driver/mysql/util/visitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func TestWhereStmtNotAlwaysTrue(t *testing.T) {
t.Run(tt.input, func(t *testing.T) {
stmt, err := parser.New().ParseOneStmt(tt.input, "", "")
assert.NoError(t, err)
got := WhereStmtNotAlwaysTrue(stmt.(*ast.SelectStmt).Where)
got := !WhereStmtNotAlwaysTrue(stmt.(*ast.SelectStmt).Where)
assert.Equal(t, tt.want, got)
})
}
Expand Down

0 comments on commit f9f9ae2

Please sign in to comment.