go-sqlite
go-sqlite copied to clipboard
Trivial scan does not work
See the repro case here: https://github.com/filmil/bugreports/tree/main/go-sqlite
I have a repro program which just creates a database and tries to do a trivial scan from the table. It errors out in go-sqlite but works as expected with mattn/go-sqlite3.
Here's the example output with the two sqlite3 drivers, and the difference between them. Refer to the above link for the program and the repro case.
The programs are almost identical.
The only real change is the use of driver name sqlite3 vs sqlite and the respective imports.
┬─[fmil@fmil9:~/code/bugreports/go-sqlite]─[11:38:54 AM]
│ (g/b:main)
╰─>$ cd ex && rm -f test.sqlite && go run . && cd -
GetAnn: Next error: bad parameter or other API misuse: not an error (21)got: ⏎
┬─[fmil@fmil9:~/code/bugreports/go-sqlite]─[11:39:00 AM]
│ (g/b:main)
╰─>$ cd ex2 && rm -f test.sqlite && go run . && cd -
got: field⏎
try remove any whitespace after last semicolon, or remove semicolon at all. tell me if it worked
Yes, this fixes the issue.
https://github.com/filmil/bugreports/commit/05c1a7c26b9398af75595b72707c0bd0a0b79656
Still a bug, though.
On Tue, Jan 16, 2024 at 12:18 PM gleb @.***> wrote:
try remove any whitespace after last semicolon, or remove semicolon at all. tell me if it worked
— Reply to this email directly, view it on GitHub https://github.com/glebarez/go-sqlite/issues/157#issuecomment-1894450533, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB4GMEYNBHX7UY3VY4QTADYO3OBJAVCNFSM6AAAAABB5LTMLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJUGQ2TANJTGM . You are receiving this because you authored the thread.Message ID: @.***>
yes, will look into it. thank you