1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Sync wal branch with [012cf101bf].

FossilOrigin-Name: 9d690f24f634696f76fa38372461cfa69263e91e
This commit is contained in:
dan
2010-04-13 06:20:45 +00:00
7 changed files with 45 additions and 29 deletions

View File

@@ -252,6 +252,7 @@ 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"

View File

@@ -334,4 +334,31 @@ do_test hook-5.2.2 {
# 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

View File

@@ -467,6 +467,7 @@ run_tests "inmemory_journal" -description {
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.