blob: 0c83d97ee0b420ad2c4e50476a74b85602f7e793 [file] [log] [blame]
drhcb9882a2005-03-17 03:15:40 +00001# 2005 Mar 16
2#
3# The author disclaims copyright to this source code. In place of
4# a legal notice, here is a blessing:
5#
6# May you do good and not evil.
7# May you find forgiveness for yourself and forgive others.
8# May you share freely, never taking more than you give.
9#
10#***********************************************************************
11# This file implements regression tests for SQLite library.
12#
13# This file implements tests for miscellanous features that were
14# left out of other test files.
15#
16# $Id: misc5.test,v 1.1 2005/03/17 03:15:40 drh Exp $
17
18set testdir [file dirname $argv0]
19source $testdir/tester.tcl
20
21# Build records using the MakeRecord opcode such that the size of the
22# header is at the transition point in the size of a varint.
23#
24# This test causes an assertion failure or a buffer overrun in version
25# 3.1.5 and earlier.
26#
27for {set i 120} {$i<140} {incr i} {
28 do_test misc5-1.$i {
29 catchsql {DROP TABLE t1}
30 set sql1 {CREATE TABLE t1}
31 set sql2 {INSERT INTO t1 VALUES}
32 set sep (
33 for {set j 0} {$j<$i} {incr j} {
34 append sql1 ${sep}a$j
35 append sql2 ${sep}$j
36 set sep ,
37 }
38 append sql1 {);}
39 append sql2 {);}
40 execsql $sql1$sql2
41 } {}
42}
43
44finish_test