0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-05-18 01:17:44 +00:00
Commit Graph

16 Commits

Author SHA1 Message Date
ef446125f7 write queue ()
* introduce connection manager

* remove unused wal methods

* remove lock stealer

* Make use of ConnectionManager in LibsqlConnection

it now takes a W: WalWrap instead of a WalManager. This is because we
want to inject the connection manager at the bottom of the wal wrapping
chain.

* add missing deps

* turn ReplicationLogger into a WrapWal

* update spots to to pass wal wrapper instead of wal manager

* remove dbg

* fmt

* fix sqlite3 rust tests
2024-03-20 22:27:13 +00:00
112c72bb8e bugfix: RANDOM ROWID should be respected in VACUUM and bulk insert ops ()
* Add regression tests for random rowid bugs

Tests added for:

1. VACUUM does not respect RANDOM ROWID - https://github.com/tursodatabase/libsql/issues/929
2. Bulk insert into a fresh table does not respect RANDOM ROWID - https://github.com/tursodatabase/libsql/issues/1046

In both cases, the table should end up random rowids, but they seem to have sequential ones.

* bugfix: pass `regNextRowid` to `OP_NewRowid` call in `xferOptimization`

The register `regNextRowid` contains the `LIBSQL_RANDOM_ROWID_MARKER` value
which tells the VDBE to use a random value for row ids. The method `xferOptimization`
is used in `VACUUM` and bulk insert routines where data from one table is
inserted in another. Since the data is inserted in a loop, it checks for
max rowid once and then keeps inserting it serially. Hence we pass the marker
in each call, so that random id is generated.
2024-02-19 16:58:50 +00:00
d178de8f07 bugfix: reset modifications of sqlite3_vtab ()
* Remove `libsql_module` field from `sqlite3_vtab`

* remove `libsql_module` struct

Also removed the associated functions `libsql_create_module_v2`, `libsql_create_module` functions'.

The `libsql_module` had a function `xPreparedSql` which is now moved to `sqlite_module`. The `sqlite_module` might get changed in the upstream, so added some padding space for our custom functions

* generate ffi bindings

* Add a github workflow to test crsqlite

* fix crsqlite: remove `pLibsqlModule` references

* Add tests for sqlite-vss extension
2024-02-15 18:18:30 +00:00
b0887d6fa6 fix ci () 2024-02-07 08:54:01 +00:00
a72c066a8e Wal related changes ()
wal extensions
2024-02-06 17:44:23 +00:00
e1cc9ff829 return number of committed frames on insert_frames () 2024-01-25 16:39:29 +00:00
62f61dbf14 review edits 2024-01-19 12:16:25 +01:00
e83308c5e5 fix sqlite3 rust tests 2024-01-19 09:33:22 +01:00
0e025264b2 fix missing commit frame on local_client inject from snapshot 2023-12-13 13:18:07 +01:00
ae9daa8b74 Use NonZeroU32 for frame_no and page_no 2023-12-05 09:20:44 +01:00
49b11abce0 homogenise rust wal naming 2023-11-30 11:26:49 +01:00
ff53bcbc57 rename libsql_create_wal to libsql_wal_manager 2023-11-30 11:25:22 +01:00
100c52cbb5 fix rust tests 2023-11-30 11:24:52 +01:00
0dfca64aa3 Merge tag 'version-3.44.0' into HEAD 2023-11-15 14:46:34 +01:00
e7ca93a902 fix ci 2023-10-16 15:25:18 +02:00
bf899d0b9a restructure repository 2023-10-16 13:58:16 +02:00