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

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

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/sqlite/src/test/select8.test ('k') | third_party/sqlite/src/test/selectE.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 # 2008 June 24 1 # 2008 June 24
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1368 } 1368 }
1369 1369
1370 do_execsql_test 4.2.2 { 1370 do_execsql_test 4.2.2 {
1371 SELECT c, f(d,c,d,c,d) FROM t7 1371 SELECT c, f(d,c,d,c,d) FROM t7
1372 UNION ALL 1372 UNION ALL
1373 SELECT a, b FROM t6 1373 SELECT a, b FROM t6
1374 ORDER BY 1,2 1374 ORDER BY 1,2
1375 } {/2 . 3 . 4 . 5 . 6 . 7 ./} 1375 } {/2 . 3 . 4 . 5 . 6 . 7 ./}
1376 1376
1377 1377
1378 proc strip_rnd {explain} {
1379 regexp -all {sqlite_sq_[0123456789ABCDEF]*} $explain sqlite_sq
1380 }
1381
1382 proc do_same_test {tn q1 args} {
1383 set r2 [strip_rnd [db eval "EXPLAIN $q1"]]
1384 set i 1
1385 foreach q $args {
1386 set tst [subst -nocommands {strip_rnd [db eval "EXPLAIN $q"]}]
1387 uplevel do_test $tn.$i [list $tst] [list $r2]
1388 incr i
1389 }
1390 }
1391
1392 do_execsql_test 5.0 {
1393 CREATE TABLE t8(a, b);
1394 CREATE TABLE t9(c, d);
1395 } {}
1396
1397 do_same_test 5.1 {
1398 SELECT a, b FROM t8 INTERSECT SELECT c, d FROM t9 ORDER BY a;
1399 } {
1400 SELECT a, b FROM t8 INTERSECT SELECT c, d FROM t9 ORDER BY t8.a;
1401 } {
1402 SELECT a, b FROM t8 INTERSECT SELECT c, d FROM t9 ORDER BY 1;
1403 } {
1404 SELECT a, b FROM t8 INTERSECT SELECT c, d FROM t9 ORDER BY c;
1405 } {
1406 SELECT a, b FROM t8 INTERSECT SELECT c, d FROM t9 ORDER BY t9.c;
1407 }
1408
1409 do_same_test 5.2 {
1410 SELECT a, b FROM t8 UNION SELECT c, d FROM t9 ORDER BY a COLLATE NOCASE
1411 } {
1412 SELECT a, b FROM t8 UNION SELECT c, d FROM t9 ORDER BY t8.a COLLATE NOCASE
1413 } {
1414 SELECT a, b FROM t8 UNION SELECT c, d FROM t9 ORDER BY 1 COLLATE NOCASE
1415 } {
1416 SELECT a, b FROM t8 UNION SELECT c, d FROM t9 ORDER BY c COLLATE NOCASE
1417 } {
1418 SELECT a, b FROM t8 UNION SELECT c, d FROM t9 ORDER BY t9.c COLLATE NOCASE
1419 }
1420
1421 do_same_test 5.3 {
1422 SELECT a, b FROM t8 EXCEPT SELECT c, d FROM t9 ORDER BY b, c COLLATE NOCASE
1423 } {
1424 SELECT a, b FROM t8 EXCEPT SELECT c, d FROM t9 ORDER BY 2, 1 COLLATE NOCASE
1425 } {
1426 SELECT a, b FROM t8 EXCEPT SELECT c, d FROM t9 ORDER BY d, a COLLATE NOCASE
1427 } {
1428 SELECT a, b FROM t8 EXCEPT SELECT * FROM t9 ORDER BY t9.d, c COLLATE NOCASE
1429 } {
1430 SELECT * FROM t8 EXCEPT SELECT c, d FROM t9 ORDER BY d, t8.a COLLATE NOCASE
1431 }
1432
1433 do_catchsql_test 5.4 {
1434 SELECT * FROM t8 UNION SELECT * FROM t9 ORDER BY a+b COLLATE NOCASE
1435 } {1 {1st ORDER BY term does not match any column in the result set}}
1436
1437
1378 finish_test 1438 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/select8.test ('k') | third_party/sqlite/src/test/selectE.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698