SQLite

Ticket Change Details
Login
Overview

Artifact ID: c83cd179b0254e660c0d7bb474d4e0abf99dece2d746e0f889d042f084440182
Ticket: fb8c538a8f57ae2a69540a293141dcc9dfb832b5
Incorrect sorting when a column uses BINARY collation in the ORDER BY, but is constrained by an == with a different collation in the WHERE clause
User & Date: dan 2020-02-12 06:21:39
Changes

  1. foundin changed to: "3.31.0"
  2. icomment:
    Example:
    
    <verbatim>
      CREATE TABLE t1(b COLLATE nocase);
      INSERT INTO t1 VALUES('abc');
      INSERT INTO t1 VALUES('ABC');
      INSERT INTO t1 VALUES('aBC');
    
      -- correctly returns: "ABC aBC abc"
      SELECT * FROM t1 ORDER BY b COLLATE binary;
    
      -- incorrectly omits external sort and returns: "abc ABC aBC"
      SELECT * FROM t1 WHERE b='abc' ORDER BY b COLLATE binary;
    </verbatim>
    
  3. login: "dan"
  4. mimetype: "text/x-fossil-wiki"
  5. severity changed to: "Minor"
  6. status changed to: "Open"
  7. title changed to:
    Incorrect sorting when a column uses BINARY collation in the ORDER BY, but is constrained by an == with a different collation in the WHERE clause
    
  8. type changed to: "Code_Defect"