SQLite

Check-in [382eea36c5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Minor changes to make some newer test cases work under more compile-time options.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 382eea36c56f866efee1321f643687a4061e8b9e
User & Date: drh 2016-12-27 02:43:47.038
Context
2016-12-27
12:08
Avoid a potential (harmless) signed integer overflow in memory usage accounting when calling sqlite3_realloc() to reduce the size of an allocation. (check-in: 2d71cbdf6b user: drh tags: trunk)
02:43
Minor changes to make some newer test cases work under more compile-time options. (check-in: 382eea36c5 user: drh tags: trunk)
2016-12-26
12:25
During fuzz testing with the fuzzcheck utility program, impose a record length limit of 100MB and a limit on the length of LIKE strings of 50 bytes. (check-in: edc9db41f3 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/nockpt.test.
19
20
21
22
23
24
25

26
27
28
29
30
31
32
source $testdir/malloc_common.tcl
source $testdir/wal_common.tcl
ifcapable !wal {finish_test ; return }

set testprefix nockpt

do_execsql_test 1.0 {

  PRAGMA page_size = 1024;
  PRAGMA journal_mode = wal;
  CREATE TABLE c1(x, y, z);
  INSERT INTO c1 VALUES(1, 2, 3);
} {wal}

do_test 1.1 { file exists test.db-wal } 1







>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
source $testdir/malloc_common.tcl
source $testdir/wal_common.tcl
ifcapable !wal {finish_test ; return }

set testprefix nockpt

do_execsql_test 1.0 {
  PRAGMA auto_vacuum=OFF;
  PRAGMA page_size = 1024;
  PRAGMA journal_mode = wal;
  CREATE TABLE c1(x, y, z);
  INSERT INTO c1 VALUES(1, 2, 3);
} {wal}

do_test 1.1 { file exists test.db-wal } 1
Changes to test/shell1.test.
269
270
271
272
273
274
275

276
277
278
279
280
281
282
283

284
285
286
287
288
289
290
  catchcmd "test.db" ".bail OFF"
} {0 {}}
do_test shell1-3.2.4 {
  # too many arguments
  catchcmd "test.db" ".bail OFF BAD"
} {1 {Usage: .bail on|off}}


# .databases             List names and files of attached databases
do_test shell1-3.3.1 {
  catchcmd "-csv test.db" ".databases"
} "/0.+main.+[string map {/ ".{1,2}"} [string range [get_pwd] 0 10]].*/"
do_test shell1-3.3.2 {
  # extra arguments ignored
  catchcmd "test.db" ".databases BAD"
} "/0.+main.+[string map {/ ".{1,2}"} [string range [get_pwd] 0 10]].*/"


# .dump ?TABLE? ...      Dump the database in an SQL text format
#                          If TABLE specified, only dump tables matching
#                          LIKE pattern TABLE.
do_test shell1-3.4.1 {
  set res [catchcmd "test.db" ".dump"]
  list [regexp {BEGIN TRANSACTION;} $res] \







>








>







269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
  catchcmd "test.db" ".bail OFF"
} {0 {}}
do_test shell1-3.2.4 {
  # too many arguments
  catchcmd "test.db" ".bail OFF BAD"
} {1 {Usage: .bail on|off}}

ifcapable vtab {
# .databases             List names and files of attached databases
do_test shell1-3.3.1 {
  catchcmd "-csv test.db" ".databases"
} "/0.+main.+[string map {/ ".{1,2}"} [string range [get_pwd] 0 10]].*/"
do_test shell1-3.3.2 {
  # extra arguments ignored
  catchcmd "test.db" ".databases BAD"
} "/0.+main.+[string map {/ ".{1,2}"} [string range [get_pwd] 0 10]].*/"
}

# .dump ?TABLE? ...      Dump the database in an SQL text format
#                          If TABLE specified, only dump tables matching
#                          LIKE pattern TABLE.
do_test shell1-3.4.1 {
  set res [catchcmd "test.db" ".dump"]
  list [regexp {BEGIN TRANSACTION;} $res] \
Changes to test/shell6.test.
10
11
12
13
14
15
16

17
18
19
20
21
22
23
#***********************************************************************
#
# Test the shell tool ".lint fkey-indexes" command.
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

set testprefix shell6
set CLI [test_find_cli]
db close
forcedelete test.db test.db-journal test.db-wal

foreach {tn schema output} {
  1 {







>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#***********************************************************************
#
# Test the shell tool ".lint fkey-indexes" command.
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl
ifcapable !vtab {finish_test; return}
set testprefix shell6
set CLI [test_find_cli]
db close
forcedelete test.db test.db-journal test.db-wal

foreach {tn schema output} {
  1 {
94
95
96
97
98
99
100
101
102
    catchcmd test.db [list .lint fkey-indexes]
  } {0 {}}

  db close
}

finish_test









<
<
95
96
97
98
99
100
101


    catchcmd test.db [list .lint fkey-indexes]
  } {0 {}}

  db close
}

finish_test