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

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

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 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/pager1.test ('k') | third_party/sqlite/src/test/pageropt.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 # 2010 June 15 1 # 2010 June 15
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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 if {[catch {db backup test.db2} msg]} { error [regsub {.*: } $msg {}] } 677 if {[catch {db backup test.db2} msg]} { error [regsub {.*: } $msg {}] }
678 } -test { 678 } -test {
679 faultsim_test_result {0 {}} {1 {}} {1 {SQL logic error or missing database}} 679 faultsim_test_result {0 {}} {1 {}} {1 {SQL logic error or missing database}}
680 } 680 }
681 681
682 # If TEMP_STORE is 2 or greater, then the database [db2] will be created 682 # If TEMP_STORE is 2 or greater, then the database [db2] will be created
683 # as an in-memory database. This test will not work in that case, as it 683 # as an in-memory database. This test will not work in that case, as it
684 # is not possible to change the page-size of an in-memory database. Even 684 # is not possible to change the page-size of an in-memory database. Even
685 # using the backup API. 685 # using the backup API.
686 # 686 #
687 if {$TEMP_STORE<2} { 687 # Update: It is no longer possible to change the page size of any temp
688 do_faultsim_test pagerfault-14b -prep { 688 # database after it has been created.
689 catch { db2 close } 689 #
690 faultsim_restore_and_reopen 690 do_faultsim_test pagerfault-14b -prep {
691 catch { db2 close }
692 faultsim_restore_and_reopen
691 sqlite3 db2 "" 693 sqlite3 db2 ""
692 db2 eval { PRAGMA page_size = 4096; CREATE TABLE xx(a) } 694 db2 eval { PRAGMA page_size = 4096; CREATE TABLE xx(a) }
693 } -body { 695 } -body {
694 sqlite3_backup B db2 main db main 696 sqlite3_backup B db2 main db main
695 B step 200 697 B step 200
696 set rc [B finish] 698 set rc [B finish]
697 if {[string match SQLITE_IOERR_* $rc]} {set rc SQLITE_IOERR} 699 if {[string match SQLITE_IOERR_* $rc]} {set rc SQLITE_IOERR}
698 if {$rc != "SQLITE_OK"} { error [sqlite3_test_errstr $rc] } 700 if {$rc != "SQLITE_OK"} { error [sqlite3_test_errstr $rc] }
699 set {} {} 701 set {} {}
700 } -test { 702 } -test {
701 faultsim_test_result {0 {}} {1 {sqlite3_backup_init() failed}} 703 faultsim_test_result {1 {attempt to write a readonly database}} \
702 } 704 {1 {sqlite3_backup_init() failed}}
703 } 705 }
704 706
705 do_faultsim_test pagerfault-14c -prep { 707 do_faultsim_test pagerfault-14c -prep {
706 catch { db2 close } 708 catch { db2 close }
707 faultsim_restore_and_reopen 709 faultsim_restore_and_reopen
708 sqlite3 db2 test.db2 710 sqlite3 db2 test.db2
709 db2 eval { 711 db2 eval {
710 PRAGMA synchronous = off; 712 PRAGMA synchronous = off;
711 PRAGMA page_size = 4096; 713 PRAGMA page_size = 4096;
712 CREATE TABLE xx(a); 714 CREATE TABLE xx(a);
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 faultsim_test_result {0 {}} 1542 faultsim_test_result {0 {}}
1541 catch { db close } 1543 catch { db close }
1542 catch { db2 close } 1544 catch { db2 close }
1543 } 1545 }
1544 1546
1545 sqlite3_shutdown 1547 sqlite3_shutdown
1546 sqlite3_config_uri 0 1548 sqlite3_config_uri 0
1547 sqlite3_initialize 1549 sqlite3_initialize
1548 1550
1549 finish_test 1551 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/pager1.test ('k') | third_party/sqlite/src/test/pageropt.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698