Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

102 lines
2.4 KiB
Plaintext

# 2013-05-23
#
# 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
ifcapable !mmap||!vtab {
finish_test
return
}
source $testdir/lock_common.tcl
set testprefix mmap3
# A codec shuts down memory-mapped I/O
if {[nonzero_reserved_bytes]} {finish_test; return;}
do_test mmap3-1.0 {
load_static_extension db wholenumber
db eval {
PRAGMA mmap_size=100000;
CREATE TABLE t1(x, y);
CREATE VIRTUAL TABLE nums USING wholenumber;
INSERT INTO t1 SELECT value, randomblob(value) FROM nums
WHERE value BETWEEN 1 and 1000;
SELECT sum(x), sum(length(y)) from t1;
PRAGMA mmap_size;
}
} {100000 500500 500500 100000}
do_test mmap3-1.2 {
db eval {
PRAGMA mmap_size=50000;
CREATE TABLE t2(a,b);
SELECT name FROM sqlite_master WHERE type='table' ORDER BY 1;
PRAGMA quick_check;
PRAGMA mmap_size;
}
} {50000 nums t1 t2 ok 50000}
do_test mmap3-1.3 {
db eval {
PRAGMA mmap_size=250000;
DROP TABLE t2;
SELECT name FROM sqlite_master WHERE type='table' ORDER BY 1;
PRAGMA quick_check;
PRAGMA mmap_size;
}
} {250000 nums t1 ok 250000}
do_test mmap3-1.4 {
db eval {SELECT x FROM t1 WHERE +x BETWEEN 10 AND 15} {
db eval {PRAGMA mmap_size=150000}
}
db eval {
PRAGMA quick_check;
PRAGMA mmap_size;
}
} {ok 250000}
do_test mmap3-1.5 {
db eval {SELECT x FROM t1 WHERE +x BETWEEN 10 AND 15} {
db eval {PRAGMA mmap_size=0}
}
db eval {
PRAGMA quick_check;
PRAGMA mmap_size;
}
} {ok 250000}
do_test mmap3-1.6 {
db eval {SELECT x FROM t1 WHERE +x BETWEEN 10 AND 15} {
set x [db one {PRAGMA mmap_size}]
}
set x [concat $x [db eval {
PRAGMA quick_check;
PRAGMA mmap_size;
}]]
} {250000 ok 250000}
do_test mmap3-1.7 {
db eval {
PRAGMA mmap_size(0);
CREATE TABLE t3(a,b,c);
SELECT name FROM sqlite_master WHERE type='table' ORDER BY 1;
PRAGMA quick_check;
PRAGMA mmap_size;
}
} {0 nums t1 t3 ok 0}
do_test mmap3-1.8 {
db eval {SELECT x FROM t1 WHERE +x BETWEEN 10 AND 15} {
db eval {PRAGMA mmap_size=75000}
}
db eval {
PRAGMA quick_check;
PRAGMA mmap_size;
}
} {ok 75000}
finish_test