Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Side by Side Diff: third_party/sqlite/sqlite-src-3080704/test/tkt-fa7bf5ec.test

Issue 883353008: [sql] Import reference version of SQLite 3.8.7.4. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hold back encoding change which is messing up patch. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # 2011 October 13
2 #
3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
5 #
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
9 #
10 #***********************************************************************
11 # This file implements regression tests for SQLite library. Specifically,
12 # it tests that ticket [fa7bf5ec94801e7e2030e41eefe5d9dd96eaacfd] has
13 # been resolved.
14 #
15 # The problem described by this ticket was that the sqlite3ExprCompare()
16 # function was saying that expressions (x='a') and (x='A') were identical
17 # because it was using sqlite3StrICmp() instead of strcmp() to compare string
18 # literals. That was causing the query optimizer for aggregate queries to
19 # believe that both count() operations were identical, and thus only
20 # computing the first count() and making a copy of the result for the
21 # second count().
22 #
23
24 set testdir [file dirname $argv0]
25 source $testdir/tester.tcl
26
27 do_test tkt-fa7bf5ec-1 {
28 execsql {
29 CREATE TABLE t1(x);
30 INSERT INTO t1 VALUES ('a');
31 INSERT INTO t1 VALUES ('A');
32 INSERT INTO t1 VALUES ('A');
33 SELECT count(CASE WHEN x='a' THEN 1 END),
34 count(CASE WHEN x='A' THEN 1 END)
35 FROM t1;
36 }
37 } {1 2}
38
39 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698