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

Side by Side Diff: third_party/sqlite/src/test/collate4.test

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/test/coalesce.test ('k') | third_party/sqlite/src/test/conflict.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 1 #
2 # 2001 September 15 2 # 2001 September 15
3 # 3 #
4 # The author disclaims copyright to this source code. In place of 4 # The author disclaims copyright to this source code. In place of
5 # a legal notice, here is a blessing: 5 # a legal notice, here is a blessing:
6 # 6 #
7 # May you do good and not evil. 7 # May you do good and not evil.
8 # May you find forgiveness for yourself and forgive others. 8 # May you find forgiveness for yourself and forgive others.
9 # May you share freely, never taking more than you give. 9 # May you share freely, never taking more than you give.
10 # 10 #
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 # 314 #
315 # These tests - collate4-2.* - check that indices are correctly 315 # These tests - collate4-2.* - check that indices are correctly
316 # selected or not selected to implement WHERE clauses when user 316 # selected or not selected to implement WHERE clauses when user
317 # defined collation sequences are involved. 317 # defined collation sequences are involved.
318 # 318 #
319 # Indices may optimise WHERE clauses using <, >, <=, >=, = or IN 319 # Indices may optimise WHERE clauses using <, >, <=, >=, = or IN
320 # operators. 320 # operators.
321 # 321 #
322 do_test collate4-2.1.0 { 322 do_test collate4-2.1.0 {
323 execsql { 323 execsql {
324 PRAGMA automatic_index=OFF;
324 CREATE TABLE collate4t1(a COLLATE NOCASE); 325 CREATE TABLE collate4t1(a COLLATE NOCASE);
325 CREATE TABLE collate4t2(b COLLATE TEXT); 326 CREATE TABLE collate4t2(b COLLATE TEXT);
326 327
327 INSERT INTO collate4t1 VALUES('a'); 328 INSERT INTO collate4t1 VALUES('a');
328 INSERT INTO collate4t1 VALUES('A'); 329 INSERT INTO collate4t1 VALUES('A');
329 INSERT INTO collate4t1 VALUES('b'); 330 INSERT INTO collate4t1 VALUES('b');
330 INSERT INTO collate4t1 VALUES('B'); 331 INSERT INTO collate4t1 VALUES('B');
331 INSERT INTO collate4t1 VALUES('c'); 332 INSERT INTO collate4t1 VALUES('c');
332 INSERT INTO collate4t1 VALUES('C'); 333 INSERT INTO collate4t1 VALUES('C');
333 INSERT INTO collate4t1 VALUES('d'); 334 INSERT INTO collate4t1 VALUES('d');
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 INSERT INTO collate4t1 VALUES('0', '1', '1'); 420 INSERT INTO collate4t1 VALUES('0', '1', '1');
420 INSERT INTO collate4t1 VALUES('1', '0', '0'); 421 INSERT INTO collate4t1 VALUES('1', '0', '0');
421 INSERT INTO collate4t1 VALUES('1', '0', '1'); 422 INSERT INTO collate4t1 VALUES('1', '0', '1');
422 INSERT INTO collate4t1 VALUES('1', '1', '0'); 423 INSERT INTO collate4t1 VALUES('1', '1', '0');
423 INSERT INTO collate4t1 VALUES('1', '1', '1'); 424 INSERT INTO collate4t1 VALUES('1', '1', '1');
424 insert into collate4t2 SELECT * FROM collate4t1; 425 insert into collate4t2 SELECT * FROM collate4t1;
425 } 426 }
426 } {} 427 } {}
427 do_test collate4-2.2.1 { 428 do_test collate4-2.2.1 {
428 count { 429 count {
429 SELECT * FROM collate4t2 NATURAL JOIN collate4t1; 430 SELECT * FROM collate4t2 NOT INDEXED NATURAL JOIN collate4t1 NOT INDEXED;
430 } 431 }
431 } {0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 63} 432 } {0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 63}
432 do_test collate4-2.2.1b { 433 do_test collate4-2.2.1b {
433 execsql { 434 execsql {
434 CREATE INDEX collate4i1 ON collate4t1(a, b, c); 435 CREATE INDEX collate4i1 ON collate4t1(a, b, c);
435 } 436 }
436 count { 437 count {
437 SELECT * FROM collate4t2 NATURAL JOIN collate4t1; 438 SELECT * FROM collate4t2 NATURAL JOIN collate4t1;
438 } 439 }
439 } {0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 29} 440 } {0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 29}
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 SELECT * FROM collate4t1 ORDER BY oid; 692 SELECT * FROM collate4t1 ORDER BY oid;
692 } 693 }
693 } {10 15 101 nosort} 694 } {10 15 101 nosort}
694 do_test collate4-6.3 { 695 do_test collate4-6.3 {
695 cksort { 696 cksort {
696 SELECT * FROM collate4t1 ORDER BY oid||'' COLLATE TEXT; 697 SELECT * FROM collate4t1 ORDER BY oid||'' COLLATE TEXT;
697 } 698 }
698 } {10 101 15 sort} 699 } {10 101 15 sort}
699 700
700 finish_test 701 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/coalesce.test ('k') | third_party/sqlite/src/test/conflict.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698