SQLite Forum

Assertion failure in editPage function
Login

Assertion failure in editPage function

(1) By Song Liu (songliu) on 2023-05-08 01:24:37 [source]

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

I already tried to minimize the queries but it's still very long.

.open /
pragma page_size=512;
CREATE TABLE a(b,c,l,PRIMARY KEY(c));
INSERT INTO a VALUES(0,zeroblob(70000),0);
CREATE TABLE t1(a);
INSERT INTO t1 VALUES(randomblob(5000));
CREATE TABLE t4(a m(0),b);
WITH RECURSIVE c(x)AS(VALUES(0)UNION SELECT x+1 FROM c WHERE x<1000)INSERT INTO t4(a,b)SELECT x,julianday(000)FROM c;
PRAGMA auto_vacuum=incremental;
PRAGMA max_page_count=2;
PRAGMA journal_mode=o;
VACUUM;
VACUUM;
DROP table"t1";
DROP TABLE t4;
DROP table"t4";
CREATE TABLE c(c);
CREATE TABLE t1(c);
CREATE TABLE t(f);
CREATE TABLE t0(g R(0));
DELETE FROM t4;
DROP TABLE t4;
CREATE VIRTUAL TABLE v00 USING fts4();
create TABLE a00(a,b, c, PRIMARY KEY(a, b));
CREATE VIRTUAL TABLE v0 USING z0000000( R0000);
CREATE UNIQUE INDEX i0 ON t1(0, 0);
CREATE TABLE t4(a I00,b);
CREATE TABLE n0000(s0000 UNIQUE AS (0), x00000000 REFERENCES n000(n000));
CREATE INDEX t000 ON t4(0) WHERE date(0) BETWEEN 0000000000 AND 000000000000;
WITH RECURSIVE c(x)AS(VALUES(0)UNION SELECT x+1 FROM c)INSERT INTO t4(a,b)SELECT 0,0 FROM c;
CREATE TABLE s(x);
CREATE TABLE t5(y);

Here are the outputs:

sqlite3-asan: sqlite3.c:76415: int editPage(MemPage *, int, int, int, CellArray *): Assertion `0' failed.

My compilation flags:

export CFLAGS="-g -DSQLITE_DEBUG
            -DSQLITE_ENABLE_TREETRACE
            -DSQLITE_ENABLE_WHERETRACE
            -DSQLITE_ENABLE_CURSOR_HINTS
            -DSQLITE_COUNTOFVIEW_OPTIMIZATION
            -DSQLITE_ENABLE_STAT4"
./configure --enable-all --enable-debug --disable-shared && make