Skip to content

from-csv: print sqlite's stderr as text instead of hex#1042

Open
c-tonneslan wants to merge 1 commit into
tursodatabase:mainfrom
c-tonneslan:fix/csv-error-not-hex
Open

from-csv: print sqlite's stderr as text instead of hex#1042
c-tonneslan wants to merge 1 commit into
tursodatabase:mainfrom
c-tonneslan:fix/csv-error-not-hex

Conversation

@c-tonneslan
Copy link
Copy Markdown

Updates #810.

The error path stringified the captured stderr with `%x`, which turned sqlite3's actual message into a wall of hex digits. The reporter saw `could not load csv into new database file: exit status 1: 4572726f723a206e656172...` and had to hex-decode it manually to see what went wrong.

Switch to `%s` and trim trailing whitespace so the message reads as sqlite intended. Leaves the validation half of the issue (rejecting bad table names up front) for a separate change.

The error path stringified the captured stderr with %x, which turned
sqlite3's actual message into a wall of hex digits. The reporter saw
"could not load csv into new database file: exit status 1:
4572726f723a206e656172..." and had to manually hex-decode it to see
what went wrong.

Switch to %s and trim trailing whitespace so the message reads as
sqlite intended.

Updates tursodatabase#810.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant