Skip to content

Commit

Permalink
sqlite3: fix missing pager causing SQLITE_MISUSE
Browse files Browse the repository at this point in the history
This fixes a missing pager that `libsql_pager_codec` expects to not be
null. All this does is add the pager when we call `sqlite3PagerWalInsert`
to the wal frame we want to insert.

Fixes #1867
  • Loading branch information
LucioFranco committed Dec 13, 2024
1 parent 6ed1690 commit aabea5f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions libsql-ffi/bundled/SQLite3MultipleCiphers/src/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -65363,6 +65363,7 @@ SQLITE_PRIVATE int sqlite3PagerWalInsert(Pager *pPager, unsigned int iFrame, voi
pghdr.pExtra = NULL;
pghdr.pgno = pgno;
pghdr.flags = 0;
pghdr.pPager = pPager;

int isCommit = (nTruncate != 0);

Expand Down
1 change: 1 addition & 0 deletions libsql-ffi/bundled/src/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -65363,6 +65363,7 @@ SQLITE_PRIVATE int sqlite3PagerWalInsert(Pager *pPager, unsigned int iFrame, voi
pghdr.pExtra = NULL;
pghdr.pgno = pgno;
pghdr.flags = 0;
pghdr.pPager = pPager;

int isCommit = (nTruncate != 0);

Expand Down
1 change: 1 addition & 0 deletions libsql-sqlite3/src/pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -7852,6 +7852,7 @@ int sqlite3PagerWalInsert(Pager *pPager, unsigned int iFrame, void *pBuf, unsign
pghdr.pExtra = NULL;
pghdr.pgno = pgno;
pghdr.flags = 0;
pghdr.pPager = pPager;

int isCommit = (nTruncate != 0);

Expand Down

0 comments on commit aabea5f

Please sign in to comment.