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

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

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. 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
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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 execsql { 297 execsql {
298 SELECT (c1||'') COLLATE numeric FROM collate1t1 ORDER BY 1; 298 SELECT (c1||'') COLLATE numeric FROM collate1t1 ORDER BY 1;
299 } 299 }
300 } {{} 1 12 101} 300 } {{} 1 12 101}
301 do_test collate1-4.5 { 301 do_test collate1-4.5 {
302 execsql { 302 execsql {
303 DROP TABLE collate1t1; 303 DROP TABLE collate1t1;
304 } 304 }
305 } {} 305 } {}
306 306
307 # A problem reported on the mailing list: A CREATE TABLE statement
308 # is allowed to have two or more COLLATE clauses on the same column.
309 # That probably ought to be an error, but we allow it for backwards
310 # compatibility. Just make sure it works and doesn't leak memory.
311 #
312 do_test collate1-5.1 {
313 execsql {
314 CREATE TABLE c5(
315 id INTEGER PRIMARY KEY,
316 a TEXT COLLATE binary COLLATE nocase COLLATE rtrim,
317 b TEXT COLLATE nocase COLLATE binary,
318 c TEXT COLLATE rtrim COLLATE binary COLLATE rtrim COLLATE nocase
319 );
320 INSERT INTO c5 VALUES(1, 'abc','abc','abc');
321 INSERT INTO c5 VALUES(2, 'abc ','ABC','ABC');
322 SELECT id FROM c5 WHERE a='abc' ORDER BY id;
323 }
324 } {1 2}
325 do_test collate1-5.2 {
326 execsql {
327 SELECT id FROM c5 WHERE b='abc' ORDER BY id;
328 }
329 } {1}
330 do_test collate1-5.3 {
331 execsql {
332 SELECT id FROM c5 WHERE c='abc' ORDER BY id;
333 }
334 } {1 2}
335
307 finish_test 336 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698