diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:28:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:28:19 +0000 |
commit | 18657a960e125336f704ea058e25c27bd3900dcb (patch) | |
tree | 17b438b680ed45a996d7b59951e6aa34023783f2 /ext/session/sessionbig.test | |
parent | Initial commit. (diff) | |
download | sqlite3-upstream.tar.xz sqlite3-upstream.zip |
Adding upstream version 3.40.1.upstream/3.40.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ext/session/sessionbig.test')
-rw-r--r-- | ext/session/sessionbig.test | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/ext/session/sessionbig.test b/ext/session/sessionbig.test new file mode 100644 index 0000000..80ce00a --- /dev/null +++ b/ext/session/sessionbig.test @@ -0,0 +1,108 @@ +# 2014 August 16 +# +# 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 implements regression tests for sessions SQLite extension. +# Specifically, this file contains tests for "patchset" changes. +# + +if {![info exists testdir]} { + set testdir [file join [file dirname [info script]] .. .. test] +} +source [file join [file dirname [info script]] session_common.tcl] +source $testdir/tester.tcl +ifcapable !session {finish_test; return} + +if {[permutation]=="session_strm" || [permutation]=="session_eec"} { + finish_test + return +} + +if {$::tcl_platform(pointerSize)<8} { + finish_test + return +} + +set testprefix sessionbig + +forcedelete test.db2 +sqlite3 db2 test.db2 + +do_execsql_test 1.0 { + CREATE TABLE t1(a INTEGER PRIMARY KEY, b); +} +do_execsql_test -db db2 1.1 { + CREATE TABLE t1(a INTEGER PRIMARY KEY, b); +} + +do_test 1.2 { + do_then_apply_sql { + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + } +} {} + +do_test 1.3 { + execsql { DELETE FROM t1 } + execsql2 { DELETE FROM t1 } +} {} + +do_test 1.4 { + set rc [catch { + do_then_apply_sql { + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + INSERT INTO t1(b) VALUES( zeroblob(100*1000*1000) ); + } + } msg] + list $rc $msg +} {1 SQLITE_NOMEM} + + +finish_test + |