interplane.Get Omega
Read in your language

sqlite

[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.

Brought by drakestapleton

branch master Branches Tags History

sqlite / ext / session / sessionbig2.test

62 lines · 1416 bytes Raw Blame History
1# 2026 June 26
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 file implements regression tests for sessions SQLite extension.
13#
14
15if {![info exists testdir]} {
16 set testdir [file join [file dirname [info script]] .. .. test]
17}
18source [file join [file dirname [info script]] session_common.tcl]
19source $testdir/tester.tcl
20ifcapable !session {finish_test; return}
21
22if {[permutation]=="session_strm" || [permutation]=="session_eec"} {
23 finish_test
24 return
25}
26
27if {$::tcl_platform(pointerSize)<8} {
28 finish_test
29 return
30}
31
32set testprefix sessionbig2
33
34foreach {tn sz} {
35 1 1000
36 2 1073741820
37} {
38 reset_db
39
40 set big [string repeat A $sz]
41
42 do_execsql_test 1.$tn.0 {
43 CREATE TABLE t(pk BLOB PRIMARY KEY);
44 INSERT INTO t VALUES($big);
45 }
46 set D [changeset_from_sql { DELETE FROM t WHERE 1 }]
47 do_execsql_test 1.$tn.1 {
48 DROP TABLE t;
49 CREATE TABLE t(pk BLOB PRIMARY KEY, v INT);
50 INSERT INTO t VALUES($big, 1);
51 }
52 set U [changeset_from_sql { UPDATE t SET v=2 WHERE 1 }]
53 do_test 1.$tn.2 {
54 sqlite3rebaser_create R
55 R configure $D
56 R rebase $U
57 R delete
58 } {}
59}
60
61finish_test
62