Hi,

We found a assertion bug in sqlite3, here is the poc:

—
CREATE TABLE v0 ( v1 CHAR(25) , v2 INTEGER UNIQUE ON CONFLICT ABORT NOT NULL 
PRIMARY KEY CHECK( datetime ( lower ( v2 ) , NOT lower ( v1 / 1 ) ) == 'MED 
PACK' NOT LIKE v2 ) ) ; CREATE TRIGGER alias AFTER INSERT ON v0 BEGIN INSERT OR 
REPLACE INTO v0 SELECT v1 , SUM ( v2 ) FROM v0 GROUP BY v2 ORDER BY 'SM PACK' ; 
END ; CREATE TRIGGER x INSERT ON v0 BEGIN UPDATE v0 SET v1 = quote ( v2 ) WHERE 
v2 IN ( SELECT v2 FROM v0 ORDER BY v1 ) ; END ; INSERT INTO v0 VALUES ( 10 , 1 
) ; INSERT INTO v0 VALUES ( 'Al' , 10 ) ; INSERT INTO v0 ( v1 ) VALUES ( 10 ) 
,( 0 ) ,( 99 ) ,( 9223372036854775807 ) ,( 3 ) ,( 10 ) ; UPDATE v0 SET v2 = ( 
SELECT max ( v2 ) AS y FROM v0 AS v WHERE v2 = 10 AND v1 MATCH v0 . v1 ) ; 
SELECT v1 BETWEEN v2 AND '!INSERT INTO test VALUES (1, 0, 0); !INSERT INTO test 
VALUES (0, 1, 0); !INSERT INTO test VALUES (0, 0, null);’ ;


int sqlite3BtreeInsert(BtCursor *, const BtreePayload *, int, int): Assertion 
`pCur->curFlags & BTCF_ValidNKey' failed.
—
This bug is reported before but seems not completely fixed.
This bug exists in the latest development code and release code. We will be 
appreciated if we can be noticed with the commit the bug gets fixed.

Yongheng & Rui
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to