SQLite

View Ticket
Login
Ticket Hash: 2ea2425d34bee9668ea8055016fed56aa5e773f8
Title: Assertion fault: Text encoding mismatch on value comparison
Status: Fixed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Code_Generator Resolution: Fixed
Last Modified: 2009-09-03 01:26:42
Version Found In: 3.6.17
Description:
The following SQL when run into an sqlite3 command-line shell (that is compiled
with assert() enabled) will generate an assertion fault:

<verbatim>
  PRAGMA encoding=UTF16;
  CREATE TABLE t1(a,b); 
  INSERT INTO t1 VALUES('abc',1);
  SELECT 1 FROM t1
   WHERE length(a) <= 10
     AND a <> 'xyz';
</verbatim>

The problem appears to have been introduced with version 3.5.8.
The problem was discovered by Firefox developers as their bug number 514291.

<hr><i>drh added on 2009-09-03 01:26:42:</i><br>
Problem introduced by check-in [91cc646e2b0c1d] on 2008-04-01.
Fixed by check-in [f22e388727f0] on 2009-09-03.