Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Keao <[email protected]>
  • Loading branch information
YangKeao committed Dec 5, 2024
1 parent b514dd8 commit 3633ec0
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions types/datum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,30 +544,21 @@ func TestStringToMysqlBit(t *testing.T) {
{NewStringDatum("b'1'"), []byte{0x62, 0x27, 0x31, 0x27}, 32, false},
{NewStringDatum("b'0'"), []byte{0x62, 0x27, 0x30, 0x27}, 32, false},
}
<<<<<<< HEAD:types/datum_test.go
sc := new(stmtctx.StatementContext)
sc.IgnoreTruncate = true
tp := NewFieldType(mysql.TypeBit)
tp.SetFlen(1)
for _, tt := range tests {
bin, err := tt.a.convertToMysqlBit(nil, tp)
require.NoError(t, err)
require.Equal(t, tt.out, bin.b)
=======
for _, tt := range tests {
t.Run(fmt.Sprintf("%s %d %t", tt.a.GetString(), tt.flen, tt.truncated), func(t *testing.T) {
tp := NewFieldType(mysql.TypeBit)
tp.SetFlen(tt.flen)

bin, err := tt.a.convertToMysqlBit(DefaultStmtNoWarningContext, tp)
bin, err := tt.a.convertToMysqlBit(sc, tp)
if tt.truncated {
require.Contains(t, err.Error(), "Data Too Long")
} else {
require.NoError(t, err)
}
require.Equal(t, tt.out, bin.b)
})
>>>>>>> 95b04c76703 (table: fix the issue that the default value for `BIT` column is wrong (#57303)):pkg/types/datum_test.go
}
}

Expand Down

0 comments on commit 3633ec0

Please sign in to comment.