Skip to content

Commit 5585f96

Browse files
committed
Don't create sql.Context in MySQLRangeCut.Compare
1 parent d169367 commit 5585f96

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sql/range_cut.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package sql
1616

1717
import (
18+
"context"
1819
"fmt"
1920
)
2021

@@ -130,7 +131,7 @@ var _ MySQLRangeCut = Above{}
130131
// Compare implements MySQLRangeCut.
131132
func (a Above) Compare(c MySQLRangeCut, typ Type) (int, error) {
132133
//TODO: Add context parameter to MySQLRangeCut.Compare
133-
ctx := NewEmptyContext()
134+
ctx := context.Background()
134135
switch c := c.(type) {
135136
case AboveAll:
136137
return -1, nil
@@ -207,7 +208,7 @@ var _ MySQLRangeCut = Below{}
207208
// Compare implements MySQLRangeCut.
208209
func (b Below) Compare(c MySQLRangeCut, typ Type) (int, error) {
209210
//TODO: Add context parameter to MySQLRangeCut.Compare
210-
ctx := NewEmptyContext()
211+
ctx := context.Background()
211212
switch c := c.(type) {
212213
case AboveAll:
213214
return -1, nil

0 commit comments

Comments
 (0)