Built-in RTRIM collating sequence yields incorrect comparisons
|User & Date:||mrigger 2019-06-14 11:03:06|
Consider the following statements: <pre> CREATE TABLE t0(c0 COLLATE RTRIM, c1 BLOB UNIQUE, PRIMARY KEY (c0, c1)) WITHOUT ROWID; INSERT INTO t0 VALUES (123, 3), (' ', 1), (' ', 2), ('', 4); SELECT * FROM t0 WHERE c1 = 1; -- expected: ' ', 1, actual: no row is fetched </pre> I would expect a row to be fetched, which is not the case. Note that the whitespace seems to be significant: the first one is a space, the second one a tab, and the third one an empty string.
- login: "mrigger"
- mimetype: "text/x-fossil-wiki"
- severity changed to: "Critical"
- status changed to: "Open"
- title changed to:
Row is not fetched in WITHOUT ROWID table and a composite primary key
- type changed to: "Code_Defect"