File: fts4merge2.test

package info (click to toggle)
sqlcipher 4.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 120,100 kB
  • sloc: ansic: 285,202; tcl: 19,833; javascript: 12,886; java: 8,151; sh: 4,409; yacc: 1,644; makefile: 1,578; cpp: 440; cs: 307; sql: 45
file content (38 lines) | stat: -rw-r--r-- 784 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
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


set testdir [file dirname $argv0]
source $testdir/tester.tcl
source $testdir/fts3_common.tcl
source $testdir/malloc_common.tcl
set ::testprefix fts4merge2

# If SQLITE_ENABLE_FTS3 is defined, omit this file.
ifcapable !fts3 {
  finish_test
  return
}

do_test 1.0 {
  fts3_build_db_1 1000
  faultsim_save_and_close
} {}

do_faultsim_test 1.1 -faults oom-* -prep {
  faultsim_restore_and_reopen
} -body {
  execsql { INSERT INTO t1(t1) VALUES('merge=32,4') }
} -test {
  faultsim_test_result {0 {}} 
}

do_faultsim_test 1.2 -faults oom-t* -prep {
  if {$iFail<100} {set iFail 803}
  faultsim_restore_and_reopen
} -body {
  execsql { INSERT INTO t1(t1) VALUES('merge=1,2') }
  execsql { INSERT INTO t1(t1) VALUES('merge=1,2') }
} -test {
  faultsim_test_result {0 {}} 
}

finish_test