CoolFace
Modelpublic

AryaWu/sqlite

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
mallocL.test43 linesDownload Raw Back to test
1# 2014 August 122#3# The author disclaims copyright to this source code.  In place of4# 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 16set testdir [file dirname $argv0]17source $testdir/tester.tcl18source $testdir/malloc_common.tcl19set testprefix mallocL20 21do_test 1.0 {22  for {set i 0} {$i < 40} {incr i} { 23    lappend cols "c$i" 24    lappend vals $i25  }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 32for {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 $::sql36  } -test {37    faultsim_test_result [list 0 [lrange $::vals 0 $::j]]38  }39}40 41 42finish_test43