https://github.com/pingcap/tidb/issues/27687.
(t *testing.T)
| 53 | |
| 54 | // https://github.com/pingcap/tidb/issues/27687. |
| 55 | func TestTableCodecInvalid(t *testing.T) { |
| 56 | tableID := int64(100) |
| 57 | buf := make([]byte, 0, 11) |
| 58 | buf = append(buf, 't') |
| 59 | buf = codec.EncodeInt(buf, tableID) |
| 60 | buf = append(buf, '_', 'r') |
| 61 | buf = codec.EncodeInt(buf, -9078412423848787968) |
| 62 | buf = append(buf, '0') |
| 63 | _, err := DecodeRowKey(buf) |
| 64 | require.NotNil(t, err) |
| 65 | require.Equal(t, "invalid encoded key", err.Error()) |
| 66 | } |
| 67 | |
| 68 | // column is a structure used for test |
| 69 | type column struct { |
nothing calls this directly
no test coverage detected