panic on INSERT ... RETURNING ScalarFunc(empty blob)
Schema:
CREATE TABLE "testtable" ("data" BLOB NOT NULL);
Query:
db.Query(`INSERT INTO "main"."testtable" ("data") VALUES (?) RETURNING SCALAR_FUNC("data");`, []byte{})
When the data column is empty (passing []byte{}
), sqlite panics during query execution, before calling SCALAR_FUNC(). If it is not empty, everything is fine
See this commit for a unit test exhibiting the issue: rledisez/sqlite@c172afa4
Edited by Romain LE DISEZ