/ Check-in [c8974603]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Add new test file sqllimits1.test. (CVS 3952)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c8974603976ebc02edbc9ab271e87e57f8eb365e
User & Date: danielk1977 2007-05-08 15:59:06
Context
2007-05-08
16:13
Add a test case that uses a trigger to insert many rows to sqllimits1.test. (CVS 3953) check-in: 63682225 user: danielk1977 tags: trunk
15:59
Add new test file sqllimits1.test. (CVS 3952) check-in: c8974603 user: danielk1977 tags: trunk
15:46
Do not allocate so much surplus memory in the implementation of the replace() function. (CVS 3951) check-in: 0cf518ce user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/all.test.

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
..
55
56
57
58
59
60
61

62
63
64
65
66
67
68
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file runs all tests.
#
# $Id: all.test,v 1.40 2007/04/16 17:07:55 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl
rename finish_test really_finish_test
proc finish_test {} {
  memleak_check
}
................................................................................
  crash.test
  crash2.test
  autovacuum_crash.test
  quick.test
  malloc.test
  misuse.test
  memleak.test

}

# Files to include in the test.  If this list is empty then everything
# that is not in the EXCLUDE list is run.
#
set INCLUDE {
}







|







 







>







6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
..
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file runs all tests.
#
# $Id: all.test,v 1.41 2007/05/08 15:59:06 danielk1977 Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl
rename finish_test really_finish_test
proc finish_test {} {
  memleak_check
}
................................................................................
  crash.test
  crash2.test
  autovacuum_crash.test
  quick.test
  malloc.test
  misuse.test
  memleak.test
  sqllimits1.test
}

# Files to include in the test.  If this list is empty then everything
# that is not in the EXCLUDE list is run.
#
set INCLUDE {
}

Changes to test/quick.test.

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
51
52
53
54
55
56
57

58
59
60
61
62
63
64
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file runs all tests.
#
# $Id: quick.test,v 1.53 2007/04/28 15:47:45 danielk1977 Exp $

proc lshift {lvar} {
  upvar $lvar l
  set ret [lindex $l 0]
  set l [lrange $l 1 end]
  return $ret
}
................................................................................
  malloc3.test
  memleak.test
  misc7.test
  misuse.test
  quick.test
  speed1.test
  speed2.test


  incrvacuum_ioerr.test
  autovacuum_crash.test
  btree8.test
  utf16.test
  shared_err.test
  vtab_err.test







|







 







>







2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file runs all tests.
#
# $Id: quick.test,v 1.54 2007/05/08 15:59:06 danielk1977 Exp $

proc lshift {lvar} {
  upvar $lvar l
  set ret [lindex $l 0]
  set l [lrange $l 1 end]
  return $ret
}
................................................................................
  malloc3.test
  memleak.test
  misc7.test
  misuse.test
  quick.test
  speed1.test
  speed2.test
  sqllimits1.test

  incrvacuum_ioerr.test
  autovacuum_crash.test
  btree8.test
  utf16.test
  shared_err.test
  vtab_err.test

Added test/sqllimits1.test.



















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# 2007 May 8
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
# This file contains tests to verify that the limits defined in
# sqlite source file limits.h are enforced.
#
# $Id: sqllimits1.test,v 1.1 2007/05/08 15:59:06 danielk1977 Exp $

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

#--------------------------------------------------------------------
# Test cases sqllimits-1.* test that the SQLITE_MAX_LENGTH limit
# is enforced.
#
do_test sqllimits-1.1 {
  catchsql { SELECT randomblob(2147483647) }
} {1 {string or blob too big}}

# Large, but allowable, blob-size.
#
set ::LARGESIZE [expr $SQLITE_MAX_LENGTH - 1] 

do_test sqllimits-1.2 {
  catchsql { SELECT LENGTH(randomblob($::LARGESIZE)) }
} "0 $::LARGESIZE"

do_test sqllimits-1.3 {
  catchsql { SELECT quote(randomblob($::LARGESIZE)) }
} {1 {string or blob too big}}

do_test sqllimits-1.4 {
  set ::str [string repeat A 65537]
  set ::rep [string repeat B 65537]
  catchsql { SELECT replace($::str, 'A', $::rep) }
} {1 {string or blob too big}}

#--------------------------------------------------------------------
# Test cases sqllimits-1.* test that the SQLITE_MAX_SQL limit
# is enforced.
#
do_test sqllimits-2.1 {
  set    sql "SELECT 1 WHERE 1==1"
  append sql [string repeat " AND 1==1" 200000]
  catchsql $sql
} {1 {String or BLOB exceeded size limit}}

finish_test