tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
9.54k stars 252 forks source link

set error to pParse and preserve internal invariant about possible error inside the condition #1595

Closed sivukhin closed 2 months ago

sivukhin commented 2 months ago

Context

quick.test failing with debug build due to broken invariants:

recoverfault-1-oom-persistent.1428... Ok
testfixture: sqlite3.c:127443: sqlite3KeyInfoOfIndex: Assertion `pParse->rc==SQLITE_ERROR_MISSING_COLLSEQ' failed.
[1]    180982 IOT instruction (core dumped)  ./testfixture test/quick.test

This is due to violation of sqlite3 invariant which was introduced in the PR #1571

This PR align our patch with sqlite invariants and expectations