From 03ce121423fc8ca30fb7b52666ee1a73b1ae7578 Mon Sep 17 00:00:00 2001 From: winkyao Date: Mon, 28 Nov 2022 14:36:29 -0800 Subject: [PATCH 01/13] session: remove useless parser object in SessionHandle of bindinfo package --- bindinfo/session_handle.go | 7 +++---- session/session.go | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bindinfo/session_handle.go b/bindinfo/session_handle.go index e6baebe3ea960..a2e03931798a8 100644 --- a/bindinfo/session_handle.go +++ b/bindinfo/session_handle.go @@ -33,13 +33,12 @@ import ( // SessionHandle is used to handle all session sql bind operations. type SessionHandle struct { - ch *bindCache - parser *parser.Parser + ch *bindCache } // NewSessionBindHandle creates a new SessionBindHandle. -func NewSessionBindHandle(parser *parser.Parser) *SessionHandle { - sessionHandle := &SessionHandle{parser: parser} +func NewSessionBindHandle() *SessionHandle { + sessionHandle := &SessionHandle{} sessionHandle.ch = newBindCache() return sessionHandle } diff --git a/session/session.go b/session/session.go index 553e529c8a736..6fbb70d4d4c98 100644 --- a/session/session.go +++ b/session/session.go @@ -3066,7 +3066,7 @@ func createSessionWithOpt(store kv.Storage, opt *Opt) (*session, error) { s.sessionVars.BinlogClient = binloginfo.GetPumpsClient() s.txn.init() - sessionBindHandle := bindinfo.NewSessionBindHandle(parser.New()) + sessionBindHandle := bindinfo.NewSessionBindHandle() s.SetValue(bindinfo.SessionBindInfoKeyType, sessionBindHandle) s.SetSessionStatesHandler(sessionstates.StateBinding, sessionBindHandle) return s, nil From 68eecc2b4a817497f5a9aacd650a812c48cdba96 Mon Sep 17 00:00:00 2001 From: winkyao Date: Mon, 28 Nov 2022 16:04:31 -0800 Subject: [PATCH 02/13] session: change parser.New to get a parser from pool --- session/bootstrap.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/session/bootstrap.go b/session/bootstrap.go index 678cc2c1832a3..ce25efa427349 100644 --- a/session/bootstrap.go +++ b/session/bootstrap.go @@ -2223,7 +2223,8 @@ func rebuildAllPartitionValueMapAndSorted(s *session) { PartitionExpr() (*tables.PartitionExpr, error) } - p := parser.New() + p := parserPool.Get().(*parser.Parser) + defer parserPool.Put(p) is := s.GetInfoSchema().(infoschema.InfoSchema) for _, dbInfo := range is.AllSchemas() { for _, t := range is.SchemaTables(dbInfo.Name) { From 829a3372bce6ea61ac448b1dee6bec652bee2bc7 Mon Sep 17 00:00:00 2001 From: winkyao Date: Mon, 28 Nov 2022 16:08:12 -0800 Subject: [PATCH 03/13] Revert "session: change parser.New to get a parser from pool" This reverts commit 68eecc2b4a817497f5a9aacd650a812c48cdba96. --- session/bootstrap.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/session/bootstrap.go b/session/bootstrap.go index c93a1a88be328..450959ee68742 100644 --- a/session/bootstrap.go +++ b/session/bootstrap.go @@ -2316,8 +2316,7 @@ func rebuildAllPartitionValueMapAndSorted(s *session) { PartitionExpr() (*tables.PartitionExpr, error) } - p := parserPool.Get().(*parser.Parser) - defer parserPool.Put(p) + p := parser.New() is := s.GetInfoSchema().(infoschema.InfoSchema) for _, dbInfo := range is.AllSchemas() { for _, t := range is.SchemaTables(dbInfo.Name) { From 170ed4c9c03b3af720e7bb817cbb841ebc1caa5d Mon Sep 17 00:00:00 2001 From: winkyao Date: Mon, 28 Nov 2022 16:04:31 -0800 Subject: [PATCH 04/13] session: change parser.New to get a parser from pool --- session/bootstrap.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/session/bootstrap.go b/session/bootstrap.go index 450959ee68742..c93a1a88be328 100644 --- a/session/bootstrap.go +++ b/session/bootstrap.go @@ -2316,7 +2316,8 @@ func rebuildAllPartitionValueMapAndSorted(s *session) { PartitionExpr() (*tables.PartitionExpr, error) } - p := parser.New() + p := parserPool.Get().(*parser.Parser) + defer parserPool.Put(p) is := s.GetInfoSchema().(infoschema.InfoSchema) for _, dbInfo := range is.AllSchemas() { for _, t := range is.SchemaTables(dbInfo.Name) { From e76538f7b76126361bdfaced3d995840d79b9834 Mon Sep 17 00:00:00 2001 From: winkyao Date: Mon, 28 Nov 2022 16:08:12 -0800 Subject: [PATCH 05/13] Revert "session: change parser.New to get a parser from pool" This reverts commit 68eecc2b4a817497f5a9aacd650a812c48cdba96. --- session/bootstrap.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/session/bootstrap.go b/session/bootstrap.go index c93a1a88be328..450959ee68742 100644 --- a/session/bootstrap.go +++ b/session/bootstrap.go @@ -2316,8 +2316,7 @@ func rebuildAllPartitionValueMapAndSorted(s *session) { PartitionExpr() (*tables.PartitionExpr, error) } - p := parserPool.Get().(*parser.Parser) - defer parserPool.Put(p) + p := parser.New() is := s.GetInfoSchema().(infoschema.InfoSchema) for _, dbInfo := range is.AllSchemas() { for _, t := range is.SchemaTables(dbInfo.Name) { From 5a584716161debe07e991881024b83e3d0f24ac3 Mon Sep 17 00:00:00 2001 From: winkyao Date: Tue, 29 Nov 2022 22:11:49 -0800 Subject: [PATCH 06/13] error: fix #35289, turn non-printable chars in Duplicate entry error message into hex --- store/driver/txn/error.go | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/store/driver/txn/error.go b/store/driver/txn/error.go index 5ff5f0c776309..e7b2056a78bb1 100644 --- a/store/driver/txn/error.go +++ b/store/driver/txn/error.go @@ -20,10 +20,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - "strconv" - "strings" - "time" - "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/kvrpcpb" "github.com/pingcap/tidb/kv" @@ -36,6 +32,9 @@ import ( "github.com/pingcap/tidb/util/logutil" tikverr "github.com/tikv/client-go/v2/error" "go.uber.org/zap" + "strconv" + "strings" + "time" ) func genKeyExistsError(name string, value string, err error) error { @@ -45,6 +44,31 @@ func genKeyExistsError(name string, value string, err error) error { return kv.ErrKeyExists.FastGenByArgs(value, name) } +func printableASCII(b byte) bool { + if b >= 0 && b < 32 || b > 127 { + return false + } + + return true +} + +// fmtNonASCIIPrintableCharToHex turns non-printable-ASCII characters into Hex +func fmtNonASCIIPrintableCharToHex(str string) string { + var b bytes.Buffer + b.Grow(len(str) * 2) + for i := 0; i < len(str); i++ { + if printableASCII(str[i]) { + b.WriteByte(str[i]) + continue + } + + b.WriteString(`\x`) + // turns non-printable-ASCII character into hex-string + b.WriteString(fmt.Sprintf("%02X", str[i])) + } + return b.String() +} + func extractKeyExistsErrFromHandle(key kv.Key, value []byte, tblInfo *model.TableInfo) error { name := tblInfo.Name.String() + ".PRIMARY" _, handle, err := tablecodec.DecodeRecordKey(key) @@ -100,6 +124,8 @@ func extractKeyExistsErrFromHandle(key kv.Key, value []byte, tblInfo *model.Tabl if col.Length > 0 && len(str) > col.Length { str = str[:col.Length] } + + str = fmtNonASCIIPrintableCharToHex(str) valueStr = append(valueStr, str) } return genKeyExistsError(name, strings.Join(valueStr, "-"), nil) @@ -136,6 +162,7 @@ func extractKeyExistsErrFromIndex(key kv.Key, value []byte, tblInfo *model.Table if err != nil { return genKeyExistsError(name, key.String(), err) } + str = fmtNonASCIIPrintableCharToHex(str) valueStr = append(valueStr, str) } return genKeyExistsError(name, strings.Join(valueStr, "-"), nil) From 9cec937cd2900bb4dfc14f8d0a107d8d1dd540f2 Mon Sep 17 00:00:00 2001 From: winkyao Date: Tue, 29 Nov 2022 22:48:42 -0800 Subject: [PATCH 07/13] add unit test --- expression/integration_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/expression/integration_test.go b/expression/integration_test.go index 55c8f389a5df3..5e9b461e8f220 100644 --- a/expression/integration_test.go +++ b/expression/integration_test.go @@ -7895,3 +7895,17 @@ func TestIssue39146(t *testing.T) { tk.MustExec("set @@tidb_enable_vectorized_expression = off;") tk.MustQuery(`select str_to_date(substr(dest,1,6),'%H%i%s') from sun;`).Check(testkit.Rows("20:23:10")) } + +func TestIssue35289(t *testing.T) { + store := testkit.CreateMockStore(t) + tk := testkit.NewTestKit(t, store) + tk.MustExec("use test") + tk.MustExec("CREATE TABLE t1 (a BINARY(16) PRIMARY KEY);") + tk.MustExec(`INSERT INTO t1 VALUES (AES_ENCRYPT('a','a'));`) + err := tk.ExecToErr(`INSERT INTO t1 VALUES (AES_ENCRYPT('a','a'));`) + require.Error(t, err, `ERROR 1062 (23000): Duplicate entry '{ W]\xA1\x06u\x9D\xBD\xB1\xA3.\xE2\xD9\xA7t' for key 't1.PRIMARY'`) + + tk.MustExec(`INSERT INTO t1 VALUES (AES_ENCRYPT('b','b'));`) + err = tk.ExecToErr(`INSERT INTO t1 VALUES (AES_ENCRYPT('b','b'));`) + require.Error(t, err, "ERROR 1062 (23000): Duplicate entry '\x0C\x1E\x8DG`\xEB\x93 F&BC\xF0\xB5\xF4\xB7' for key 't1.PRIMARY'") +} From a1f0789dac92fee4a65b60194513f38263d5a8d3 Mon Sep 17 00:00:00 2001 From: winkyao Date: Tue, 29 Nov 2022 23:06:28 -0800 Subject: [PATCH 08/13] tidy the imports --- store/driver/txn/error.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/store/driver/txn/error.go b/store/driver/txn/error.go index e7b2056a78bb1..d82c183b98f17 100644 --- a/store/driver/txn/error.go +++ b/store/driver/txn/error.go @@ -20,6 +20,10 @@ import ( "encoding/hex" "encoding/json" "fmt" + "strconv" + "strings" + "time" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/kvrpcpb" "github.com/pingcap/tidb/kv" @@ -32,9 +36,6 @@ import ( "github.com/pingcap/tidb/util/logutil" tikverr "github.com/tikv/client-go/v2/error" "go.uber.org/zap" - "strconv" - "strings" - "time" ) func genKeyExistsError(name string, value string, err error) error { From 70bacbb4acc138af61d670691423a8190541b5ed Mon Sep 17 00:00:00 2001 From: winkyao Date: Tue, 29 Nov 2022 23:48:49 -0800 Subject: [PATCH 09/13] adressed comment --- store/driver/txn/error.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/store/driver/txn/error.go b/store/driver/txn/error.go index d82c183b98f17..d44e735061589 100644 --- a/store/driver/txn/error.go +++ b/store/driver/txn/error.go @@ -125,8 +125,9 @@ func extractKeyExistsErrFromHandle(key kv.Key, value []byte, tblInfo *model.Tabl if col.Length > 0 && len(str) > col.Length { str = str[:col.Length] } - - str = fmtNonASCIIPrintableCharToHex(str) + if types.IsBinaryStr(&tblInfo.Columns[col.Offset].FieldType) { + str = fmtNonASCIIPrintableCharToHex(str) + } valueStr = append(valueStr, str) } return genKeyExistsError(name, strings.Join(valueStr, "-"), nil) @@ -163,7 +164,9 @@ func extractKeyExistsErrFromIndex(key kv.Key, value []byte, tblInfo *model.Table if err != nil { return genKeyExistsError(name, key.String(), err) } - str = fmtNonASCIIPrintableCharToHex(str) + if types.IsBinaryStr(colInfo[i].Ft) { + str = fmtNonASCIIPrintableCharToHex(str) + } valueStr = append(valueStr, str) } return genKeyExistsError(name, strings.Join(valueStr, "-"), nil) From db4e92d3c0ea3a9d2299420cd93ee8af121953a2 Mon Sep 17 00:00:00 2001 From: winkyao Date: Wed, 30 Nov 2022 14:50:29 -0800 Subject: [PATCH 10/13] addressed comments and fix the dup error msg in adding unique index --- ddl/index.go | 3 +++ executor/insert_test.go | 10 ++++++++++ expression/integration_test.go | 14 -------------- store/driver/txn/error.go | 34 +++++----------------------------- types/etc.go | 5 +++++ util/util.go | 28 ++++++++++++++++++++++++++++ 6 files changed, 51 insertions(+), 43 deletions(-) diff --git a/ddl/index.go b/ddl/index.go index 818dc1eac7738..6297e71406857 100644 --- a/ddl/index.go +++ b/ddl/index.go @@ -1414,6 +1414,9 @@ func (w *addIndexWorker) checkHandleExists(key kv.Key, value []byte, handle kv.H if err != nil { str = string(val) } + if types.IsBinaryStr(colInfos[i].Ft) || types.IsTypeBit(colInfos[i].Ft) { + str = util.FmtNonASCIIPrintableCharToHex(str) + } valueStr = append(valueStr, str) } return kv.ErrKeyExists.FastGenByArgs(strings.Join(valueStr, "-"), indexName) diff --git a/executor/insert_test.go b/executor/insert_test.go index f3db8c6aca40f..68fe66f25ee0b 100644 --- a/executor/insert_test.go +++ b/executor/insert_test.go @@ -895,6 +895,16 @@ func TestInsertErrorMsg(t *testing.T) { tk.MustExec(`create table t (a int primary key, b datetime, d date)`) tk.MustContainErrMsg(`insert into t values (1, '2019-02-11 30:00:00', '2019-01-31')`, "Incorrect datetime value: '2019-02-11 30:00:00' for column 'b' at row 1") + + // test for Issue #35289 + tk.MustExec("CREATE TABLE t1 (a BINARY(16) PRIMARY KEY);") + tk.MustExec(`INSERT INTO t1 VALUES (AES_ENCRYPT('a','a'));`) + err := tk.ExecToErr(`INSERT INTO t1 VALUES (AES_ENCRYPT('a','a'));`) + require.Error(t, err, `ERROR 1062 (23000): Duplicate entry '{ W]\xA1\x06u\x9D\xBD\xB1\xA3.\xE2\xD9\xA7t' for key 't1.PRIMARY'`) + + tk.MustExec(`INSERT INTO t1 VALUES (AES_ENCRYPT('b','b'));`) + err = tk.ExecToErr(`INSERT INTO t1 VALUES (AES_ENCRYPT('b','b'));`) + require.Error(t, err, "ERROR 1062 (23000): Duplicate entry '\x0C\x1E\x8DG`\xEB\x93 F&BC\xF0\xB5\xF4\xB7' for key 't1.PRIMARY'") } func TestIssue16366(t *testing.T) { diff --git a/expression/integration_test.go b/expression/integration_test.go index 5e9b461e8f220..55c8f389a5df3 100644 --- a/expression/integration_test.go +++ b/expression/integration_test.go @@ -7895,17 +7895,3 @@ func TestIssue39146(t *testing.T) { tk.MustExec("set @@tidb_enable_vectorized_expression = off;") tk.MustQuery(`select str_to_date(substr(dest,1,6),'%H%i%s') from sun;`).Check(testkit.Rows("20:23:10")) } - -func TestIssue35289(t *testing.T) { - store := testkit.CreateMockStore(t) - tk := testkit.NewTestKit(t, store) - tk.MustExec("use test") - tk.MustExec("CREATE TABLE t1 (a BINARY(16) PRIMARY KEY);") - tk.MustExec(`INSERT INTO t1 VALUES (AES_ENCRYPT('a','a'));`) - err := tk.ExecToErr(`INSERT INTO t1 VALUES (AES_ENCRYPT('a','a'));`) - require.Error(t, err, `ERROR 1062 (23000): Duplicate entry '{ W]\xA1\x06u\x9D\xBD\xB1\xA3.\xE2\xD9\xA7t' for key 't1.PRIMARY'`) - - tk.MustExec(`INSERT INTO t1 VALUES (AES_ENCRYPT('b','b'));`) - err = tk.ExecToErr(`INSERT INTO t1 VALUES (AES_ENCRYPT('b','b'));`) - require.Error(t, err, "ERROR 1062 (23000): Duplicate entry '\x0C\x1E\x8DG`\xEB\x93 F&BC\xF0\xB5\xF4\xB7' for key 't1.PRIMARY'") -} diff --git a/store/driver/txn/error.go b/store/driver/txn/error.go index d44e735061589..d2e5e3ffc04c0 100644 --- a/store/driver/txn/error.go +++ b/store/driver/txn/error.go @@ -20,6 +20,7 @@ import ( "encoding/hex" "encoding/json" "fmt" + "github.com/pingcap/tidb/util" "strconv" "strings" "time" @@ -45,31 +46,6 @@ func genKeyExistsError(name string, value string, err error) error { return kv.ErrKeyExists.FastGenByArgs(value, name) } -func printableASCII(b byte) bool { - if b >= 0 && b < 32 || b > 127 { - return false - } - - return true -} - -// fmtNonASCIIPrintableCharToHex turns non-printable-ASCII characters into Hex -func fmtNonASCIIPrintableCharToHex(str string) string { - var b bytes.Buffer - b.Grow(len(str) * 2) - for i := 0; i < len(str); i++ { - if printableASCII(str[i]) { - b.WriteByte(str[i]) - continue - } - - b.WriteString(`\x`) - // turns non-printable-ASCII character into hex-string - b.WriteString(fmt.Sprintf("%02X", str[i])) - } - return b.String() -} - func extractKeyExistsErrFromHandle(key kv.Key, value []byte, tblInfo *model.TableInfo) error { name := tblInfo.Name.String() + ".PRIMARY" _, handle, err := tablecodec.DecodeRecordKey(key) @@ -125,8 +101,8 @@ func extractKeyExistsErrFromHandle(key kv.Key, value []byte, tblInfo *model.Tabl if col.Length > 0 && len(str) > col.Length { str = str[:col.Length] } - if types.IsBinaryStr(&tblInfo.Columns[col.Offset].FieldType) { - str = fmtNonASCIIPrintableCharToHex(str) + if types.IsBinaryStr(&tblInfo.Columns[col.Offset].FieldType) || types.IsTypeBit(&tblInfo.Columns[col.Offset].FieldType) { + str = util.FmtNonASCIIPrintableCharToHex(str) } valueStr = append(valueStr, str) } @@ -164,8 +140,8 @@ func extractKeyExistsErrFromIndex(key kv.Key, value []byte, tblInfo *model.Table if err != nil { return genKeyExistsError(name, key.String(), err) } - if types.IsBinaryStr(colInfo[i].Ft) { - str = fmtNonASCIIPrintableCharToHex(str) + if types.IsBinaryStr(colInfo[i].Ft) || types.IsTypeBit(colInfo[i].Ft) { + str = util.FmtNonASCIIPrintableCharToHex(str) } valueStr = append(valueStr, str) } diff --git a/types/etc.go b/types/etc.go index 56309d0c41ac4..6d371138193f8 100644 --- a/types/etc.go +++ b/types/etc.go @@ -90,6 +90,11 @@ func IsTypeNumeric(tp byte) bool { return false } +// IsTypeBit returns a boolean indicating whether the tp is bit type. +func IsTypeBit(ft *FieldType) bool { + return ft.GetType() == mysql.TypeBit +} + // IsTemporalWithDate returns a boolean indicating // whether the tp is time type with date. func IsTemporalWithDate(tp byte) bool { diff --git a/util/util.go b/util/util.go index 249db91f98d06..5edb010ce6c52 100644 --- a/util/util.go +++ b/util/util.go @@ -15,6 +15,7 @@ package util import ( + "bytes" "encoding/json" "fmt" "io/ioutil" @@ -174,3 +175,30 @@ func GenLogFields(costTime time.Duration, info *ProcessInfo, needTruncateSQL boo logFields = append(logFields, zap.String("sql", sql)) return logFields } + +// PrintableASCII detects if b is a printable ASCII character. +// Ref to:http://facweb.cs.depaul.edu/sjost/it212/documents/ascii-pr.htm +func PrintableASCII(b byte) bool { + if b >= 0 && b < 32 || b > 127 { + return false + } + + return true +} + +// FmtNonASCIIPrintableCharToHex turns non-printable-ASCII characters into Hex +func FmtNonASCIIPrintableCharToHex(str string) string { + var b bytes.Buffer + b.Grow(len(str) * 2) + for i := 0; i < len(str); i++ { + if PrintableASCII(str[i]) { + b.WriteByte(str[i]) + continue + } + + b.WriteString(`\x`) + // turns non-printable-ASCII character into hex-string + b.WriteString(fmt.Sprintf("%02X", str[i])) + } + return b.String() +} From dc6f191f289c75ce1ce685184885f377600c635e Mon Sep 17 00:00:00 2001 From: winkyao Date: Wed, 30 Nov 2022 15:06:59 -0800 Subject: [PATCH 11/13] fix test result --- executor/insert_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/executor/insert_test.go b/executor/insert_test.go index e9888f240426e..b55c3a63765e3 100644 --- a/executor/insert_test.go +++ b/executor/insert_test.go @@ -904,7 +904,13 @@ func TestInsertErrorMsg(t *testing.T) { tk.MustExec(`INSERT INTO t1 VALUES (AES_ENCRYPT('b','b'));`) err = tk.ExecToErr(`INSERT INTO t1 VALUES (AES_ENCRYPT('b','b'));`) - require.Error(t, err, "ERROR 1062 (23000): Duplicate entry '\x0C\x1E\x8DG`\xEB\x93 F&BC\xF0\xB5\xF4\xB7' for key 't1.PRIMARY'") + require.Error(t, err, "ERROR 1062 (23000): Duplicate entry '\\x0C\\x1E\\x8DG`\\xEB\\x93 F&BC\\xF0\\xB5\\xF4\\xB7' for key 't1.PRIMARY'") + + tk.MustExec("drop table if exists t1") + tk.MustExec("create table t1 (a bit primary key) engine=innodb;") + tk.MustExec("insert into t1 values (b'0');") + err = tk.ExecToErr(`insert into t1 values (b'0');`) + require.Error(t, err, `ERROR 1062 (23000): Duplicate entry '\x00' for key 't1.PRIMARY'`) } func TestIssue16366(t *testing.T) { From e57d0346f08706e562bff2a4ddc2b6b9aa733405 Mon Sep 17 00:00:00 2001 From: winkyao Date: Wed, 30 Nov 2022 15:19:08 -0800 Subject: [PATCH 12/13] fix import --- store/driver/txn/error.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/driver/txn/error.go b/store/driver/txn/error.go index d2e5e3ffc04c0..80543fe2f8513 100644 --- a/store/driver/txn/error.go +++ b/store/driver/txn/error.go @@ -20,7 +20,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - "github.com/pingcap/tidb/util" "strconv" "strings" "time" @@ -34,6 +33,7 @@ import ( "github.com/pingcap/tidb/table/tables" "github.com/pingcap/tidb/tablecodec" "github.com/pingcap/tidb/types" + "github.com/pingcap/tidb/util" "github.com/pingcap/tidb/util/logutil" tikverr "github.com/tikv/client-go/v2/error" "go.uber.org/zap" From 905ea2262d04fb84d6fd3f55e2d0e7bb13f35cfd Mon Sep 17 00:00:00 2001 From: winkyao Date: Wed, 30 Nov 2022 20:39:14 -0800 Subject: [PATCH 13/13] fix bazel --- store/driver/txn/BUILD.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/store/driver/txn/BUILD.bazel b/store/driver/txn/BUILD.bazel index ab10c88f12c9c..f6e5e46014a97 100644 --- a/store/driver/txn/BUILD.bazel +++ b/store/driver/txn/BUILD.bazel @@ -24,6 +24,7 @@ go_library( "//table/tables", "//tablecodec", "//types", + "//util", "//util/logutil", "@com_github_opentracing_opentracing_go//:opentracing-go", "@com_github_pingcap_errors//:errors",