SQLite Forum

Assertion Failure on query
Login

Assertion Failure on query

(1) By Yu Liang (LY1598773890) on 2021-05-28 01:02:02 [source]

Hi all

For query:

CREATE TABLE v0 ( v1 TEXT );
CREATE INDEX v4 ON v0 ( v1, v1 );
SELECT * FROM v0 WHERE ( v1 IS ( SELECT v1 ) AND v1 = 'AAA' );

Assertion failed with enable-debug compile flags applied. SQLite3 provides the following outputs:

sqlite3: sqlite3.c:87288: sqlite3VdbeExec: Assertion `memIsValid(&aMem[pOp->p3])' failed.

Here is the bisecting result:

bisect complete
  2 BAD     2021-05-27 16:31:04 f958ffbc61c693b7
  3 BAD     2021-05-26 23:10:19 9be208a6d70582c6
  4 BAD     2021-05-26 18:46:51 f30fb19ff763a7cb
  5 GOOD    2021-05-26 14:32:33 3e2c36a8272ab3c1 CURRENT
  1 GOOD    2021-05-25 16:10:12 708ce7ad8acee702

Looking forward to your reply.

(2) By Richard Hipp (drh) on 2021-05-28 13:00:23 in reply to 1 [link] [source]

Initial fix is in check-in c9f0b9cb0aef1072. Further optimizations might get added before the day is done.

Thanks for using Fossil instead of Git, and for bisecting to the problem.

(3) By Yu Liang (LY1598773890) on 2021-05-28 15:38:34 in reply to 2 [link] [source]

Thank you for the fix information.