sqlite/test/bigsort.test
dan cfce889cda Avoid running bigsort.test with SQLITE_DEBUG builds. The assert() statements added in [7c96a56] make it too slow.
FossilOrigin-Name: fa68dd8928c76888d535e649794743eeefd3abe0f909792a128955710bfc948a
2022-11-14 17:48:26 +00:00

58 lines
1.5 KiB
Plaintext

# 2014 November 26
#
# 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.
#
#***********************************************************************
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix bigsort
#--------------------------------------------------------------------
# At one point there was an overflow problem if the product of the
# cache-size and page-size was larger than 2^31. Causing an infinite
# loop if the product was also an integer multiple of 2^32, or
# inefficiency otherwise.
#
# This test causes thrashing on machines with smaller amounts of
# memory. Make sure the host has at least 8GB available before running
# this test.
#
# Update: https://sqlite.org/src/info/7c96a56 adds assert() statements
# that make this test too slow to run with SQLITE_DEBUG builds.
#
if {[catch {exec free | grep Mem:} out] || [lindex $out 1]<8000000} {
finish_test
return
}
ifcapable debug {
finish_test
return
}
do_execsql_test 1.0 {
PRAGMA page_size = 1024;
CREATE TABLE t1(a, b);
BEGIN;
WITH data(x,y) AS (
SELECT 1, zeroblob(10000)
UNION ALL
SELECT x+1, y FROM data WHERE x < 300000
)
INSERT INTO t1 SELECT * FROM data;
COMMIT;
}
do_execsql_test 1.1 {
PRAGMA cache_size = 4194304;
CREATE INDEX i1 ON t1(a, b);
}
finish_test