0
0
mirror of https://gitlab.com/cznic/sqlite.git synced 2025-05-22 23:28:02 +00:00

10 Commits

Author SHA1 Message Date
0a8da4bb8f fix error handling in test "QueryContext with context expiring"
While the query had succeeded, the context can expire right after. In
this situation, iterating the rows will fail. The test need to check for
sql.Rows.Err() too.

Also, don't forget to close sql.Rows when done to avoid memory leak.
2024-02-22 13:31:53 +00:00
61828ad287 Handle context expired/canceled in Query/Exec/Context
Passing an already canceled/expired context to QueryContext/ExecContext
would return empty results without error because interruptOnDone would
immediately set the "done" flag to one so the calling function (query or
exec) would not enter the for loop doing the meaningful work.

Similarly, if the context is expired/canceled at the "wrong time", the
same behavior could happen.

This patch first check the context is still valid when entering the
function (before launching interruptOnDone), then if the funxtion is
about to return no values and no error, it checks if the "done" flag is
set and return the context error if it makes sense.
2024-02-19 10:13:30 +01:00
bcf2a0e77c all: enable SQLITE_ENABLE_DBSTAT_VTAB 2023-07-31 22:09:36 +02:00
ae41c4a62d Add API to online backup API (sqlite3_backup_*) 2023-07-04 09:17:46 +02:00
84fc97a4b2 Add API to sqlite3_serialize/deserialize 2023-07-04 09:17:46 +02:00
b82b94e968 revert tip to v1.23.1, updates 2023-07-01 16:17:25 +02:00
2a8ff5d5e8 SQLite 3.42, 28 errors out of 839686 tests on linux/amd64 2023-06-10 23:01:20 +02:00
b5a7962754 Use static callbacks for user-defined functions
This ensures that they cannot be GCed.

See https://gitlab.com/cznic/sqlite/-/merge_requests/54#note_1396299066
for more details.
2023-05-30 21:01:32 +01:00
4a676e6e9d Allow registering aggregate and window functions
This allows registering custom aggregate and window functions (which
provide Step, Inverse, Value, and Final callbacks). It uses basically
the same interface as the zombiezen.com/go/sqlite package, which already
handles some trickier cases around multiple or concurrent invocations of
the same function.
2023-05-30 20:58:07 +01:00
a922751947 driver: add a way to register scalar functions 2022-04-03 15:57:52 +02:00