| OLD | NEW |
| 1 # 2004 September 2 | 1 # 2004 September 2 |
| 2 # | 2 # |
| 3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
| 4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
| 5 # | 5 # |
| 6 # May you do good and not evil. | 6 # May you do good and not evil. |
| 7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
| 8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
| 9 # | 9 # |
| 10 #*********************************************************************** | 10 #*********************************************************************** |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 do_test pagesize-1.3 { | 35 do_test pagesize-1.3 { |
| 36 execsql { | 36 execsql { |
| 37 CREATE TABLE t1(a); | 37 CREATE TABLE t1(a); |
| 38 PRAGMA page_size=2048; | 38 PRAGMA page_size=2048; |
| 39 PRAGMA page_size; | 39 PRAGMA page_size; |
| 40 } | 40 } |
| 41 } 1024 | 41 } 1024 |
| 42 | 42 |
| 43 do_test pagesize-1.4 { | 43 do_test pagesize-1.4 { |
| 44 db close | 44 db close |
| 45 file delete -force test.db | 45 forcedelete test.db |
| 46 sqlite3 db test.db | 46 sqlite3 db test.db |
| 47 execsql { | 47 execsql { |
| 48 PRAGMA page_size=511; | 48 PRAGMA page_size=511; |
| 49 PRAGMA page_size; | 49 PRAGMA page_size; |
| 50 } | 50 } |
| 51 } 1024 | 51 } 1024 |
| 52 do_test pagesize-1.5 { | 52 do_test pagesize-1.5 { |
| 53 execsql { | 53 execsql { |
| 54 PRAGMA page_size=512; | 54 PRAGMA page_size=512; |
| 55 PRAGMA page_size; | 55 PRAGMA page_size; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 do_test pagesize-2.$PGSZ.0.3 { | 92 do_test pagesize-2.$PGSZ.0.3 { |
| 93 execsql { | 93 execsql { |
| 94 INSERT INTO t1 VALUES(1,2,3); | 94 INSERT INTO t1 VALUES(1,2,3); |
| 95 INSERT INTO t1 VALUES(2,3,4); | 95 INSERT INTO t1 VALUES(2,3,4); |
| 96 SELECT * FROM t1; | 96 SELECT * FROM t1; |
| 97 } | 97 } |
| 98 } {1 2 3 2 3 4} | 98 } {1 2 3 2 3 4} |
| 99 } | 99 } |
| 100 do_test pagesize-2.$PGSZ.1 { | 100 do_test pagesize-2.$PGSZ.1 { |
| 101 db close | 101 db close |
| 102 file delete -force test.db | 102 forcedelete test.db |
| 103 sqlite3 db test.db | 103 sqlite3 db test.db |
| 104 execsql "PRAGMA page_size=$PGSZ" | 104 execsql "PRAGMA page_size=$PGSZ" |
| 105 execsql { | 105 execsql { |
| 106 CREATE TABLE t1(x); | 106 CREATE TABLE t1(x); |
| 107 PRAGMA page_size; | 107 PRAGMA page_size; |
| 108 } | 108 } |
| 109 } $PGSZ | 109 } $PGSZ |
| 110 do_test pagesize-2.$PGSZ.2 { | 110 do_test pagesize-2.$PGSZ.2 { |
| 111 db close | 111 db close |
| 112 sqlite3 db test.db | 112 sqlite3 db test.db |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 ifcapable {vacuum} {execsql VACUUM} | 183 ifcapable {vacuum} {execsql VACUUM} |
| 184 execsql {SELECT count(*) FROM t1} | 184 execsql {SELECT count(*) FROM t1} |
| 185 } 38 | 185 } 38 |
| 186 do_test pagesize-2.$PGSZ.16 { | 186 do_test pagesize-2.$PGSZ.16 { |
| 187 execsql {DROP TABLE t1} | 187 execsql {DROP TABLE t1} |
| 188 ifcapable {vacuum} {execsql VACUUM} | 188 ifcapable {vacuum} {execsql VACUUM} |
| 189 } {} | 189 } {} |
| 190 integrity_check pagesize-2.$PGSZ.17 | 190 integrity_check pagesize-2.$PGSZ.17 |
| 191 | 191 |
| 192 db close | 192 db close |
| 193 file delete -force test.db | 193 forcedelete test.db |
| 194 sqlite3 db test.db | 194 sqlite3 db test.db |
| 195 do_test pagesize-2.$PGSZ.30 { | 195 do_test pagesize-2.$PGSZ.30 { |
| 196 execsql " | 196 execsql " |
| 197 CREATE TABLE t1(x); | 197 CREATE TABLE t1(x); |
| 198 PRAGMA temp.page_size=$PGSZ; | 198 PRAGMA temp.page_size=$PGSZ; |
| 199 CREATE TEMP TABLE t2(y); | 199 CREATE TEMP TABLE t2(y); |
| 200 PRAGMA main.page_size; | 200 PRAGMA main.page_size; |
| 201 PRAGMA temp.page_size; | 201 PRAGMA temp.page_size; |
| 202 " | 202 " |
| 203 } [list 1024 $PGSZ] | 203 } [list 1024 $PGSZ] |
| 204 | 204 |
| 205 db close | 205 db close |
| 206 file delete -force test.db | 206 forcedelete test.db |
| 207 sqlite3 db test.db | 207 sqlite3 db test.db |
| 208 do_test pagesize-2.$PGSZ.40 { | 208 do_test pagesize-2.$PGSZ.40 { |
| 209 execsql " | 209 execsql " |
| 210 PRAGMA page_size=$PGSZ; | 210 PRAGMA page_size=$PGSZ; |
| 211 CREATE TABLE t1(x); | 211 CREATE TABLE t1(x); |
| 212 CREATE TEMP TABLE t2(y); | 212 CREATE TEMP TABLE t2(y); |
| 213 PRAGMA main.page_size; | 213 PRAGMA main.page_size; |
| 214 PRAGMA temp.page_size; | 214 PRAGMA temp.page_size; |
| 215 " | 215 " |
| 216 } [list $PGSZ $PGSZ] | 216 } [list $PGSZ $PGSZ] |
| 217 } | 217 } |
| 218 | 218 |
| 219 finish_test | 219 finish_test |
| OLD | NEW |