Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Enhanced disk-full tests. (CVS 2682) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
0288fa5d25886f6fbef0be782f12285d |
User & Date: | drh 2005-09-09 10:46:19.000 |
Context
2005-09-10
| ||
15:28 | Use of the CROSS keyword in a join prevents table reordering. Ticket #1414. (CVS 2683) (check-in: 415b8b2462 user: drh tags: trunk) | |
2005-09-09
| ||
10:46 | Enhanced disk-full tests. (CVS 2682) (check-in: 0288fa5d25 user: drh tags: trunk) | |
10:17 | Detect errors returned by SetFilePointer on windows. (CVS 2681) (check-in: bc8c33f94c user: drh tags: trunk) | |
Changes
Changes to src/os_common.h.
︙ | |||
78 79 80 81 82 83 84 85 86 87 88 89 90 91 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | + - - + + + + + + + + + | ** If we compile with the SQLITE_TEST macro set, then the following block ** of code will give us the ability to simulate a disk I/O error. This ** is used for testing the I/O recovery logic. */ #ifdef SQLITE_TEST int sqlite3_io_error_pending = 0; int sqlite3_diskfull_pending = 0; int sqlite3_diskfull = 0; #define SimulateIOError(A) \ if( sqlite3_io_error_pending ) \ if( sqlite3_io_error_pending-- == 1 ){ local_ioerr(); return A; } static void local_ioerr(){ sqlite3_io_error_pending = 0; /* Really just a place to set a breakpoint */ } #define SimulateDiskfullError \ |
︙ |
Changes to src/test2.c.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + | ** May you share freely, never taking more than you give. ** ************************************************************************* ** Code for testing the pager.c module in SQLite. This code ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** |
︙ | |||
557 558 559 560 561 562 563 564 565 566 567 568 569 570 | 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | + | /* ** Register commands with the TCL interpreter. */ int Sqlitetest2_Init(Tcl_Interp *interp){ extern int sqlite3_io_error_pending; extern int sqlite3_diskfull_pending; extern int sqlite3_diskfull; static struct { char *zName; Tcl_CmdProc *xProc; } aCmd[] = { { "pager_open", (Tcl_CmdProc*)pager_open }, { "pager_close", (Tcl_CmdProc*)pager_close }, { "pager_commit", (Tcl_CmdProc*)pager_commit }, |
︙ | |||
589 590 591 592 593 594 595 596 597 598 599 | 590 591 592 593 594 595 596 597 598 599 600 601 602 | + + | for(i=0; i<sizeof(aCmd)/sizeof(aCmd[0]); i++){ Tcl_CreateCommand(interp, aCmd[i].zName, aCmd[i].xProc, 0, 0); } Tcl_LinkVar(interp, "sqlite_io_error_pending", (char*)&sqlite3_io_error_pending, TCL_LINK_INT); Tcl_LinkVar(interp, "sqlite_diskfull_pending", (char*)&sqlite3_diskfull_pending, TCL_LINK_INT); Tcl_LinkVar(interp, "sqlite_diskfull", (char*)&sqlite3_diskfull, TCL_LINK_INT); Tcl_LinkVar(interp, "pager_pagesize", (char*)&test_pagesize, TCL_LINK_INT); return TCL_OK; } |
Changes to test/diskfull.test.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + + + + + + + + + - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + | # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing for correct handling of disk full # errors. # |