cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.99k stars 3.79k forks source link

SHOW EXPERIMENTAL_FINGERPRINTS error for STRING columns and character escapes #44237

Open mrigger opened 4 years ago

mrigger commented 4 years ago

The SHOW EXPERIMENTAL_FINGERPRINTS statement below fails with an unexpected error:

CREATE TABLE t0(c0 STRING);
INSERT INTO t0(c0) VALUES ('\n');
SHOW EXPERIMENTAL_FINGERPRINTS FROM TABLE t0; -- ERROR: hash-fingerprint: could not parse "\n" as type bytes: bytea encoded value ends with incomplete escape sequence

Also other strings with escaped characters fail with this error. I found this issue based on commit c76ad970e73e606bc55a372d93f9d2d6acb32c9c.

Jira issue: CRDB-5243

solongordon commented 4 years ago

This would be nice to fix but I suspect it doesn't affect any users. As far as I can tell it is only used by our unit tests, e.g. for backup and restore.