mirror of
https://github.com/sqlite/sqlite.git
synced 2024-12-01 01:01:28 +01:00
9b4c59fa1b
instead of "mmap_limit". Also change SQLITE_CONFIG_MMAP_LIMIT and SQLITE_FCNTL_MMAP_LIMIT to SQLITE_CONFIG_MMAP_SIZE and SQLITE_FCNTL_MMAP_SIZE, respecctively. The default mmap_size is now always 0, meaning that memory mapped I/O is off by default. There is a new compile-time option SQLITE_MAX_MMAP_SIZE that determines a hard upper bound on the mmap_size. Setting SQLITE_MAX_MMAP_SIZE to zero disables the memory-mapped I/O logic and causes it to be omitted from the build. An extra argument is added to SQLITE_CONFIG_MMAP_SIZE that can optionally lower the SQLITE_MAX_MMAP_SIZE at start-time. The SQLITE_MAX_MMAP_SIZE is zero for platforms where we know that it does not work, meaning that it cannot be turned on by mistake on those platforms. FossilOrigin-Name: ea1404a10abd7f68e1f8e0708c8a3199d1f79665
124 lines
2.6 KiB
Plaintext
124 lines
2.6 KiB
Plaintext
/*
|
|
** Configure five tasks in different ways, then run tests.
|
|
*/
|
|
PRAGMA page_size=512;
|
|
--task 1
|
|
PRAGMA mmap_size=0;
|
|
--end
|
|
--task 2
|
|
PRAGMA mmap_size=28672;
|
|
--end
|
|
--task 3
|
|
PRAGMA mmap_size=8192;
|
|
--end
|
|
--task 4
|
|
PRAGMA mmap_size=65536;
|
|
--end
|
|
--task 5
|
|
PRAGMA mmap_size=268435456;
|
|
--end
|
|
--source multiwrite01.test
|
|
--source crash02.subtest
|
|
PRAGMA page_size=1024;
|
|
VACUUM;
|
|
CREATE TABLE pgsz(taskid, sz INTEGER);
|
|
--task 1
|
|
INSERT INTO pgsz VALUES(1, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 2
|
|
INSERT INTO pgsz VALUES(2, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 3
|
|
INSERT INTO pgsz VALUES(3, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 4
|
|
INSERT INTO pgsz VALUES(4, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 5
|
|
INSERT INTO pgsz VALUES(5, eval('PRAGMA page_size'));
|
|
--end
|
|
--source multiwrite01.test
|
|
--source crash02.subtest
|
|
--wait all
|
|
SELECT sz FROM pgsz;
|
|
--match 1024 1024 1024 1024 1024
|
|
PRAGMA page_size=2048;
|
|
VACUUM;
|
|
DELETE FROM pgsz;
|
|
--task 1
|
|
INSERT INTO pgsz VALUES(1, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 2
|
|
INSERT INTO pgsz VALUES(2, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 3
|
|
INSERT INTO pgsz VALUES(3, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 4
|
|
INSERT INTO pgsz VALUES(4, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 5
|
|
INSERT INTO pgsz VALUES(5, eval('PRAGMA page_size'));
|
|
--end
|
|
--source multiwrite01.test
|
|
--source crash02.subtest
|
|
--wait all
|
|
SELECT sz FROM pgsz;
|
|
--match 2048 2048 2048 2048 2048
|
|
PRAGMA page_size=8192;
|
|
VACUUM;
|
|
DELETE FROM pgsz;
|
|
--task 1
|
|
INSERT INTO pgsz VALUES(1, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 2
|
|
INSERT INTO pgsz VALUES(2, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 3
|
|
INSERT INTO pgsz VALUES(3, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 4
|
|
INSERT INTO pgsz VALUES(4, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 5
|
|
INSERT INTO pgsz VALUES(5, eval('PRAGMA page_size'));
|
|
--end
|
|
--source multiwrite01.test
|
|
--source crash02.subtest
|
|
--wait all
|
|
SELECT sz FROM pgsz;
|
|
--match 8192 8192 8192 8192 8192
|
|
PRAGMA page_size=16384;
|
|
VACUUM;
|
|
DELETE FROM pgsz;
|
|
--task 1
|
|
INSERT INTO pgsz VALUES(1, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 2
|
|
INSERT INTO pgsz VALUES(2, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 3
|
|
INSERT INTO pgsz VALUES(3, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 4
|
|
INSERT INTO pgsz VALUES(4, eval('PRAGMA page_size'));
|
|
--end
|
|
--task 5
|
|
INSERT INTO pgsz VALUES(5, eval('PRAGMA page_size'));
|
|
--end
|
|
--source multiwrite01.test
|
|
--source crash02.subtest
|
|
--wait all
|
|
SELECT sz FROM pgsz;
|
|
--match 16384 16384 16384 16384 16384
|
|
PRAGMA auto_vacuum=FULL;
|
|
VACUUM;
|
|
--source multiwrite01.test
|
|
--source crash02.subtest
|
|
--wait all
|
|
PRAGMA auto_vacuum=FULL;
|
|
PRAGMA page_size=512;
|
|
VACUUM;
|
|
--source multiwrite01.test
|
|
--source crash02.subtest
|