Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/test/bigsort.test # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / test / bigsort.test` 57 lines ยท 1524 bytes Raw Blame History 1 # 2014 November 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 13 set testdir [file dirname $argv0] 14 source $testdir/tester.tcl 15 set testprefix bigsort 16 17 #-------------------------------------------------------------------- 18 # At one point there was an overflow problem if the product of the 19 # cache-size and page-size was larger than 2^31. Causing an infinite 20 # loop if the product was also an integer multiple of 2^32, or 21 # inefficiency otherwise. 22 # 23 # This test causes thrashing on machines with smaller amounts of 24 # memory. Make sure the host has at least 8GB available before running 25 # this test. 26 # 27 # Update: https://sqlite.org/src/info/`7c96a56` adds assert() statements 28 # that make this test too slow to run with SQLITE_DEBUG builds. 29 # 30 if {[catch {exec free | grep Mem:} out] || [lindex $out 1]<`8000000`} { 31 finish_test 32 return 33 } 34 ifcapable debug { 35 finish_test 36 return 37 } 38 39 do_execsql_test 1.0 { 40 PRAGMA page_size = 1024; 41 CREATE TABLE t1(a, b); 42 BEGIN; 43 WITH data(x,y) AS ( 44 SELECT 1, zeroblob(10000) 45 UNION ALL 46 SELECT x+1, y FROM data WHERE x < 300000 47 ) 48 INSERT INTO t1 SELECT * FROM data; 49 COMMIT; 50 } 51 do_execsql_test 1.1 { 52 PRAGMA cache_size = `4194304`; 53 CREATE INDEX i1 ON t1(a, b); 54 } 55 56 57 finish_test