SQLite

View Ticket
Login
Ticket Hash: 5ad2aa6921faa1ee5f18911261e0d92d90f2b472
Title: Debug assertion sqlite3VdbeMemAboutToChange: Assertion `(mFlags&MEM_Str)==0 || (pMem->n==pX->n && pMem->z==pX->z)' failed
Status: Fixed Type: Code_Defect
Severity: Minor Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-12-23 02:33:16
Version Found In: 3.30.0
User Comments:
mrigger added on 2019-12-22 10:26:54:

Consider the following test case:

PRAGMA encoding = 'UTF16';
CREATE TABLE t0(c0 REAL, c1);
INSERT INTO t0(c0) VALUES (''), (0);
CREATE INDEX i0 ON t0(c1) WHERE c0 GLOB 3;
UPDATE t0 SET c1=0; -- sqlite3.c:75871: sqlite3VdbeMemAboutToChange: Assertion `(mFlags&MEM_Str)==0 || (pMem->n==pX->n && pMem->z==pX->z)' failed.

When compiling with -DSQLITE_DEBUG, the UPDATE triggers an assertion error.


drh added on 2019-12-23 02:33:16:

See also ticket [c62c5e58524b204d]. Both this ticket and that ticket are false-positives in the sqlite3VdbeMemAboutToChange() assert mechanism that is used to help verify that shallow-copies of register values are not misused.