I found another similar example with GLOB:

CREATE TABLE test (c0 REAL);
CREATE UNIQUE INDEX index_0 ON test(('0' GLOB -c0));
INSERT INTO test(c0) VALUES (1.0), (0.0);
REINDEX;

Is the issue related to the implementation of the unary minus operator
(i.e., do both examples trigger the same bug)?

Best,
Manuel

On Fri, May 3, 2019 at 1:22 PM Manuel Rigger <rigger.man...@gmail.com>
wrote:

> Hi,
>
> I found another very specific corner case for which an index fails
> ("UNIQUE constraint failed: index 'index_0'"):
>
> CREATE TABLE test (c0 REAL);
> CREATE UNIQUE INDEX index_0 ON test(LENGTH(-c0));
> INSERT INTO test(c0) VALUES (0.0), ('10:');
> REINDEX;
>
>
> Best,
> Manuel
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to