/ Check-in [31356f2c]
Login

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

Overview
Comment:Add a test to ensure that the problem fixed by [a179e41e40] does not recur.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 31356f2cae26278660e6bd360ad35e57261d977c
User & Date: dan 2014-08-12 09:36:08
Context
2014-08-12
12:19
Fix typos in the VxWorks code of os_unix.c. check-in: 19682e8f user: drh tags: trunk
09:36
Add a test to ensure that the problem fixed by [a179e41e40] does not recur. check-in: 31356f2c user: dan tags: trunk
01:23
Fix an assert() statement in the SELECT code generator that was incorrect following an OOM error. check-in: a179e41e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Added test/mallocL.test.

            1  +# 2014 August 12
            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  +#
           12  +# This test script is designed to show that the assert() fix at 
           13  +# [f1cb48f412] really is required.
           14  +# 
           15  +
           16  +set testdir [file dirname $argv0]
           17  +source $testdir/tester.tcl
           18  +source $testdir/malloc_common.tcl
           19  +set testprefix mallocL
           20  +
           21  +do_test 1.0 {
           22  +  for {set i 0} {$i < 40} {incr i} { 
           23  +    lappend cols "c$i" 
           24  +    lappend vals $i
           25  +  }
           26  +
           27  +  execsql "CREATE TABLE t1([join $cols ,])"
           28  +  execsql "CREATE INDEX i1 ON t1([join $cols ,])"
           29  +  execsql "INSERT INTO t1 VALUES([join $vals ,])"
           30  +} {}
           31  +
           32  +for {set j 1} {$j < 40} {incr j} {
           33  +  set ::sql "SELECT DISTINCT [join [lrange $cols 0 $j] ,] FROM t1"
           34  +  do_faultsim_test 1.$j -faults oom* -body {
           35  +    execsql $::sql
           36  +  } -test {
           37  +    faultsim_test_result [list 0 [lrange $::vals 0 $::j]]
           38  +  }
           39  +}
           40  +
           41  +
           42  +finish_test
           43  +