Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
backend: fix handling of empty binary literals
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Jul 22, 2020
1 parent 26a0f71 commit 74a79dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/various_types/data/vt.binary.sql
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ INSERT INTO `binary` VALUES
(46, x'747B4c36678948a8921763afbee2dd15'),
(47, x'a5e015d13d76447eaf8fb834007481e9'),
(48, x'b75264a7e7074df187a2b9052ad4e36d'),
(49, x'45cD65089a064ab781406a84a109faef');
(49, x'45cD65089a064ab781406a84a109faef'),
(50, x'');
4 changes: 2 additions & 2 deletions tests/various_types/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ for BACKEND in importer tidb local; do
check_contains 'ref: 41'

run_sql 'SELECT count(pk), hex(min(pk)), hex(max(pk)) FROM vt.binary'
check_contains 'count(pk): 50'
check_contains 'hex(min(pk)): 090ABBB2F22E4F97A4FEA52EB1A80A0B'
check_contains 'count(pk): 51'
check_contains 'hex(min(pk)): '
check_contains 'hex(max(pk)): FDE1328C409C43A8B1B08C35C8000F92'
run_sql "SELECT ref FROM vt.binary WHERE pk = x'55dc0343db6a420898729096305b8c07'"
check_contains 'ref: 41'
Expand Down

0 comments on commit 74a79dd

Please sign in to comment.