Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Sync wal branch with [012cf101bf]. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | wal |
Files: | files | file ages | folders |
SHA1: |
9d690f24f634696f76fa38372461cfa6 |
User & Date: | dan 2010-04-13 06:20:45.000 |
Context
2010-04-13
| ||
11:18 | Fix a pager bug introduced by the wal code. (check-in: 4a0b29dc5e user: dan tags: wal) | |
06:20 | Sync wal branch with [012cf101bf]. (check-in: 9d690f24f6 user: dan tags: wal) | |
06:18 | Test that the rollback-hook is invoked if a commit-hook implementation returns non-zero (causing a rollback). Remove documentation comment that says otherwise from sqlite.h.in. (check-in: 012cf101bf user: dan tags: trunk) | |
2010-04-12
| ||
19:32 | Remove duplicate secure_delete pragma implemention. (check-in: c15fda145b user: drh tags: wal) | |
Changes
Changes to src/memjournal.c.
︙ | ︙ | |||
192 193 194 195 196 197 198 | ** Sync the file. ** ** Syncing an in-memory journal is a no-op. And, in fact, this routine ** is never called in a working implementation. This implementation ** exists purely as a contingency, in case some malfunction in some other ** part of SQLite causes Sync to be called by mistake. */ | | | < | < > | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | ** Sync the file. ** ** Syncing an in-memory journal is a no-op. And, in fact, this routine ** is never called in a working implementation. This implementation ** exists purely as a contingency, in case some malfunction in some other ** part of SQLite causes Sync to be called by mistake. */ static int memjrnlSync(sqlite3_file *NotUsed, int NotUsed2){ UNUSED_PARAMETER2(NotUsed, NotUsed2); return SQLITE_OK; } /* ** Query the size of the file in bytes. */ static int memjrnlFileSize(sqlite3_file *pJfd, sqlite_int64 *pSize){ MemJournal *p = (MemJournal *)pJfd; *pSize = (sqlite_int64) p->endpoint.iOffset; |
︙ | ︙ |
Changes to src/sqlite.h.in.
︙ | ︙ | |||
3876 3877 3878 3879 3880 3881 3882 | ** hook returning non-zero, just as it would be with any other rollback. ** ** ^For the purposes of this API, a transaction is said to have been ** rolled back if an explicit "ROLLBACK" statement is executed, or ** an error or constraint causes an implicit rollback to occur. ** ^The rollback callback is not invoked if a transaction is ** automatically rolled back because the database connection is closed. | < < | 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 | ** hook returning non-zero, just as it would be with any other rollback. ** ** ^For the purposes of this API, a transaction is said to have been ** rolled back if an explicit "ROLLBACK" statement is executed, or ** an error or constraint causes an implicit rollback to occur. ** ^The rollback callback is not invoked if a transaction is ** automatically rolled back because the database connection is closed. ** ** See also the [sqlite3_update_hook()] interface. */ void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); /* |
︙ | ︙ |
Changes to test/e_fts3.test.
︙ | ︙ | |||
248 249 250 251 252 253 254 255 256 257 258 259 260 261 | } {no such column: main.docs} ddl_test 1.3.2.8 { DROP TABLE docs } ########################################################################## # Test the examples in section 3 (full-text index queries). # ddl_test 1.4.1.1 { CREATE VIRTUAL TABLE docs USING fts3(title, body) } foreach {tn title body} { 2 "linux driver" "a device" 3 "driver" "linguistic trick" 4 "problems" "linux problems" 5 "linux" "big problems" 6 "linux driver" "a device driver problem" 7 "good times" "applications for linux" | > | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | } {no such column: main.docs} ddl_test 1.3.2.8 { DROP TABLE docs } ########################################################################## # Test the examples in section 3 (full-text index queries). # ddl_test 1.4.1.1 { CREATE VIRTUAL TABLE docs USING fts3(title, body) } unset -nocomplain R foreach {tn title body} { 2 "linux driver" "a device" 3 "driver" "linguistic trick" 4 "problems" "linux problems" 5 "linux" "big problems" 6 "linux driver" "a device driver problem" 7 "good times" "applications for linux" |
︙ | ︙ |
Changes to test/hook.test.
︙ | ︙ | |||
329 330 331 332 333 334 335 336 337 | SELECT count(*) FROM t1; } } {1} # # End rollback-hook testing. #---------------------------------------------------------------------------- finish_test | > > > > > > > > > > > > > > > > > > > > > > > > > > > | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | SELECT count(*) FROM t1; } } {1} # # End rollback-hook testing. #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- # Test that if a commit-hook returns non-zero (causing a rollback), the # rollback-hook is invoked. # proc commit_hook {} { lappend ::hooks COMMIT return 1 } proc rollback_hook {} { lappend ::hooks ROLLBACK } do_test hook-6.1 { set ::hooks [list] db commit_hook commit_hook db rollback_hook rollback_hook catchsql { BEGIN; INSERT INTO t1 VALUES('two', 'II'); COMMIT; } execsql { SELECT * FROM t1 } } {one I} do_test hook-6.2 { set ::hooks } {COMMIT ROLLBACK} unset ::hooks finish_test |
Changes to test/permutations.test.
︙ | ︙ | |||
463 464 465 466 467 468 469 470 471 472 473 474 475 476 | } -presql { pragma journal_mode = 'memory' } -exclude { # Exclude all tests that simulate IO errors. autovacuum_ioerr2.test incrvacuum_ioerr.test ioerr.test ioerr.test ioerr2.test ioerr3.test ioerr4.test ioerr5.test vacuum3.test incrblob_err.test diskfull.test backup_ioerr.test # Exclude test scripts that use tcl IO to access journal files or count # the number of fsync() calls. pager.test exclusive.test jrnlmode.test sync.test misc1.test journal1.test conflict.test crash8.test tkt3457.test io.test # Exclude stmt.test, which expects sub-journals to use temporary files. | > | 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | } -presql { pragma journal_mode = 'memory' } -exclude { # Exclude all tests that simulate IO errors. autovacuum_ioerr2.test incrvacuum_ioerr.test ioerr.test ioerr.test ioerr2.test ioerr3.test ioerr4.test ioerr5.test vacuum3.test incrblob_err.test diskfull.test backup_ioerr.test e_fts3.test # Exclude test scripts that use tcl IO to access journal files or count # the number of fsync() calls. pager.test exclusive.test jrnlmode.test sync.test misc1.test journal1.test conflict.test crash8.test tkt3457.test io.test # Exclude stmt.test, which expects sub-journals to use temporary files. |
︙ | ︙ |