Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GMHDBJD committed Jul 9, 2024
1 parent 4274cef commit f8af8a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/ddl/column_type_change_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func TestRowFormat(t *testing.T) {
data, err := h.GetMvccByEncodedKey(encodedKey)
require.NoError(t, err)
// The new format will start with CodecVer = 128 (0x80).
require.Equal(t, 0x80, data.Info.Writes[0].ShortValue[0])
require.Equal(t, []byte{0x80, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x2, 0x3, 0x1, 0x0, 0x4, 0x0, 0x7, 0x0, 0x1, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33}, data.Info.Writes[0].ShortValue)
tk.MustExec("drop table if exists t")
}

Expand All @@ -269,7 +269,7 @@ func TestRowFormatWithChecksums(t *testing.T) {
data, err := h.GetMvccByEncodedKey(encodedKey)
require.NoError(t, err)
// row value with checksums
expected := []byte{0x80, 0x2, 0x3, 0x0, 0x0, 0x0, 0x1, 0x2, 0x3, 0x1, 0x0, 0x4, 0x0, 0x7, 0x0, 0x1, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x1, 0xea, 0xb0, 0x41, 0x20}
expected := []byte{0x80, 0x2, 0x3, 0x0, 0x0, 0x0, 0x1, 0x2, 0x3, 0x1, 0x0, 0x4, 0x0, 0x7, 0x0, 0x1, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x1, 0x64, 0x95, 0x74, 0x34}
require.Equal(t, expected, data.Info.Writes[0].ShortValue)
tk.MustExec("drop table if exists t")
}
Expand All @@ -293,7 +293,7 @@ func TestRowLevelChecksumWithMultiSchemaChange(t *testing.T) {
data, err := h.GetMvccByEncodedKey(encodedKey)
require.NoError(t, err)
// checksum skipped and with a null col vv
expected := []byte{0x80, 0x0, 0x3, 0x0, 0x1, 0x0, 0x1, 0x2, 0x4, 0x3, 0x1, 0x0, 0x4, 0x0, 0x7, 0x0, 0x1, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33}
expected := []byte{0x80, 0x2, 0x3, 0x0, 0x1, 0x0, 0x1, 0x2, 0x4, 0x3, 0x1, 0x0, 0x4, 0x0, 0x7, 0x0, 0x1, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x1, 0x26, 0xad, 0x5a, 0xdc}
require.Equal(t, expected, data.Info.Writes[0].ShortValue)
tk.MustExec("drop table if exists t")
}
Expand Down

0 comments on commit f8af8a5

Please sign in to comment.