Re: [sqlite] TYPEOF index on REAL column malfunctions

2019-05-02 Thread Manuel Rigger
Thanks a lot!

Best,
Manuel

On Thu, May 2, 2019 at 7:52 PM Richard Hipp  wrote:

> On 5/2/19, Manuel Rigger  wrote:
> > Hi everyone,
> >
> > I think that I found another issue related to type affinity on real
> columns:
>
> The typeof() function corner-case you identified has been fixed in
> check-in https://www.sqlite.org/src/timeline?c=48889530a9de22fe
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] TYPEOF index on REAL column malfunctions

2019-05-02 Thread Richard Hipp
On 5/2/19, Manuel Rigger  wrote:
> Hi everyone,
>
> I think that I found another issue related to type affinity on real columns:

The typeof() function corner-case you identified has been fixed in
check-in https://www.sqlite.org/src/timeline?c=48889530a9de22fe

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] TYPEOF index on REAL column malfunctions

2019-05-02 Thread Manuel Rigger
Hi everyone,

I think that I found another issue related to type affinity on real columns:

CREATE TABLE test (c0 REAL);
CREATE UNIQUE INDEX index_0 ON test(TYPEOF(c0));
INSERT OR IGNORE INTO test(c0) VALUES (0.1);
INSERT OR IGNORE INTO test(c0) VALUES (FALSE);
REINDEX;

In this example, the REINDEX fails with "UNIQUE constraint failed: index
'index_0'". FALSE is converted to 0.0, so two REALs are stored.

Best,
Manuel
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users