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

Side by Side Diff: third_party/sqlite/src/test/misc5.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 # 2005 Mar 16 1 # 2005 Mar 16
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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 GROUP BY LOWER(artist) 498 GROUP BY LOWER(artist)
499 ORDER BY total DESC 499 ORDER BY total DESC
500 LIMIT 10 500 LIMIT 10
501 ) 501 )
502 WHERE artist <> '' 502 WHERE artist <> ''
503 ) 503 )
504 ) 504 )
505 ) 505 )
506 ORDER BY LOWER(artist) ASC; 506 ORDER BY LOWER(artist) ASC;
507 } 507 }
508 } {one} 508 } {two}
509 } 509 }
510 510
511 # Ticket #1370. Do not overwrite small files (less than 1024 bytes) 511 # Ticket #1370. Do not overwrite small files (less than 1024 bytes)
512 # when trying to open them as a database. 512 # when trying to open them as a database.
513 # 513 #
514 if {[permutation] == ""} { 514 if {[permutation] == ""} {
515 do_test misc5-4.1 { 515 do_test misc5-4.1 {
516 db close 516 db close
517 file delete -force test.db 517 forcedelete test.db
518 set fd [open test.db w] 518 set fd [open test.db w]
519 puts $fd "This is not really a database" 519 puts $fd "This is not really a database"
520 close $fd 520 close $fd
521 sqlite3 db test.db 521 sqlite3 db test.db
522 catchsql { 522 catchsql {
523 CREATE TABLE t1(a,b,c); 523 CREATE TABLE t1(a,b,c);
524 } 524 }
525 } {1 {file is encrypted or is not a database}} 525 } {1 {file is encrypted or is not a database}}
526 } 526 }
527 527
528 # Ticket #1371. Allow floating point numbers of the form .N or N. 528 # Ticket #1371. Allow floating point numbers of the form .N or N.
529 # 529 #
530 do_test misc5-5.1 { 530 do_test misc5-5.1 {
531 execsql {SELECT .1 } 531 execsql {SELECT .1 }
532 } 0.1 532 } 0.1
533 do_test misc5-5.2 { 533 do_test misc5-5.2 {
534 execsql {SELECT 2. } 534 execsql {SELECT 2. }
535 } 2.0 535 } 2.0
536 do_test misc5-5.3 { 536 do_test misc5-5.3 {
537 execsql {SELECT 3.e0 } 537 execsql {SELECT 3.e0 }
538 } 3.0 538 } 3.0
539 do_test misc5-5.4 { 539 do_test misc5-5.4 {
540 execsql {SELECT .4e+1} 540 execsql {SELECT .4e+1}
541 } 4.0 541 } 4.0
542 542
543 # Ticket #1582. Ensure that an unknown table in a LIMIT clause applied to 543 # Ticket #1582. Ensure that an unknown table in a LIMIT clause applied to
544 # a UNION ALL query causes an error, not a crash. 544 # a UNION ALL query causes an error, not a crash.
545 # 545 #
546 db close 546 db close
547 file delete -force test.db 547 forcedelete test.db
548 sqlite3 db test.db 548 sqlite3 db test.db
549 ifcapable subquery&&compound { 549 ifcapable subquery&&compound {
550 do_test misc5-6.1 { 550 do_test misc5-6.1 {
551 catchsql { 551 catchsql {
552 SELECT * FROM sqlite_master 552 SELECT * FROM sqlite_master
553 UNION ALL 553 UNION ALL
554 SELECT * FROM sqlite_master 554 SELECT * FROM sqlite_master
555 LIMIT (SELECT count(*) FROM blah); 555 LIMIT (SELECT count(*) FROM blah);
556 } 556 }
557 } {1 {no such table: blah}} 557 } {1 {no such table: blah}}
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 2305843009213693954\ 1865 2305843009213693954\
1866 4611686018427387902\ 1866 4611686018427387902\
1867 4611686018427387903\ 1867 4611686018427387903\
1868 4611686018427387904\ 1868 4611686018427387904\
1869 4611686018427387905\ 1869 4611686018427387905\
1870 4611686018427387906\ 1870 4611686018427387906\
1871 9223372036854775806\ 1871 9223372036854775806\
1872 9223372036854775807} 1872 9223372036854775807}
1873 1873
1874 finish_test 1874 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698