mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-27 13:04:20 +01:00
- even if index search will return only 1 row - it will call next in the loop - and we incorrecty can process same row values multiple times - the following query failed with this optimization: turso> CREATE TABLE t (id INTEGER PRIMARY KEY AUTOINCREMENT, k TEXT, c0 INT); turso> CREATE UNIQUE INDEX idx_p1_0 ON t(c0); turso> insert into t values (null, 'uu', -1); turso> insert into t values (null, 'uu', -2); turso> UPDATE t SET c0 = NULL WHERE c0 = -1; turso> SELECT * FROM t ┌────┬────┬────┐ │ id │ k │ c0 │ ├────┼────┼────┤ │ 1 │ uu │ │ ├────┼────┼────┤ │ 2 │ uu │ │ └────┴────┴────┘