SQLite

View Ticket
Login
Ticket Hash: 46fcd700b855e6d11227c6223dd5c1605a372d1e
Title: Debug assertion sqlite3VdbeMemAboutToChange: Assertion `(mFlags&MEM_Real)==0 || pMem->u.r==pX->u.r' failed (2)
Status: Fixed Type: Code_Defect
Severity: Minor Priority: Low
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-12-31 23:17:53
Version Found In: 3.30.0
User Comments:
mrigger added on 2019-12-31 21:57:21: (text/x-fossil-wiki)
The following test case causes a debug assertion to fail:

<pre>
PRAGMA foreign_keys = true;
CREATE TABLE t0(c0 TEXT PRIMARY KEY, c1 INT UNIQUE REFERENCES t0 CHECK(CAST(c1 AS INT) BETWEEN 0 AND CASE WHEN 1 THEN c0 END));
REPLACE INTO t0(c0, c1) VALUES(0.7675826647230917, 0), (0, x''); -- sqlite3.c:75952: sqlite3VdbeMemAboutToChange: Assertion `(mFlags&MEM_Real)==0 || pMem->u.r==pX->u.r' failed.
</pre>