[sqlite] Assertion `memIsValid(pRec)' failed

2020-01-01 Thread Yongheng Chen
Hi, We found an assertion failed in sqlite. And this assertion seems not to be fixed completely. Here’s the POC: — CREATE TABLE v0 ( v1 ) ; INSERT INTO v0 ( v1 ) VALUES ( 10 ) ,( 10 ) ; UPDATE v0 SET v1 = ( SELECT coalesce ( quote ( NULL ) , quote ( v1 ) , ( SELECT 1 FROM v0 AS v WHERE ( SELECT

[sqlite] Assertion `memIsValid(pRec)' failed

2020-01-01 Thread Yongheng Chen
Hi, We found an assertion failed in sqlite. Here’s the POC: — CREATE TABLE v0 ( v1 CHAR(25) ) ; CREATE TRIGGER myname AFTER INSERT ON v0 BEGIN INSERT INTO v0 SELECT ( SELECT ifnull ( count ( DISTINCT ( SELECT v1 FROM v0 ) ) , 10 ) ) FROM v0 AS d WHERE v1 = v1 AND v1 <= v1 GROUP BY v1 , v1 ORDER