SQLite User Forum

Assertion failure in pager_playback_one_page function
Login

Assertion failure in pager_playback_one_page function

(1) By Song Liu (songliu) on 2023-04-19 01:22:55 [source]

I found an assertion failure while SQLite (latest, ba8e4378f21d529a) executes the following queries.

pragma page_size=512;
pragma auto_vacuum=2;
CREATE TABLE t1(a);
INSERT INTO t1 VALUES (randomblob(5000));
DELETE FROM t1 WHERE rowid%8;
SAVEPOINT o;
PRAGMA incremental_vacuum=0;
PRAGMA max_page_count=2;
INSERT INTO t1 VALUES (randomblob(5000));
COMMIT;
DELETE FROM t1 WHERE rowid%8;
SAVEPOINT "";
CREATE TABLE s00000000 (a000000);
CREATE TABLE t0 (g0000000000000000000);
CREATE TABLE t5 (y00);
CREATE INDEX t000 on t5(0) WHERE datetime(000) IS NOT NULL;
CREATE TABLE t2 (d000000);
CREATE TABLE t4 (i00000000000000000000000);
CREATE TABLE t6 (m D0000000, n D00000000, PRIMARY KEY(m, n));
"";
DROP table "t0";
CREATE TABLE t (R);
CREATE TABLE t0 (o000);

Here are the outputs:

3
Runtime error near line 1: database or disk is full (13)
Runtime error near line 2: database or disk is full (13)
sqlite3: sqlite3.c:57992: pager_playback_one_page: Assertion `pPg || !MEMDB' failed.
[1]    2854945 abort      ./sqlite3 < poc

Here is the result of bisecting:

 14 BAD     2020-10-26 18:14:12 aa512f72cf5adfec CURRENT
 12 GOOD    2020-10-26 16:22:31 80eba105d6d1b49b

My compilation flags:

export CFLAGS="-g -DSQLITE_DEBUG"