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
81 lines
1.7 KiB
Plaintext
81 lines
1.7 KiB
Plaintext
# 2012 August 6
|
|
#
|
|
# 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 index5
|
|
|
|
do_test 1.1 {
|
|
if {[permutation]=="memsubsys1"} {
|
|
execsql { PRAGMA auto_vacuum = 0; }
|
|
}
|
|
execsql {
|
|
PRAGMA page_size = 1024;
|
|
CREATE TABLE t1(x);
|
|
BEGIN;
|
|
}
|
|
for {set i 0} {$i < 100000} {incr i} {
|
|
execsql { INSERT INTO t1 VALUES(randstr(100,100)) }
|
|
}
|
|
execsql COMMIT
|
|
execsql {
|
|
CREATE INDEX i1 ON t1(x);
|
|
DROP INDEX I1;
|
|
PRAGMA main.page_size;
|
|
}
|
|
} {1024}
|
|
|
|
db close
|
|
testvfs tvfs
|
|
tvfs filter xWrite
|
|
tvfs script write_cb
|
|
proc write_cb {xCall file handle iOfst args} {
|
|
if {[file tail $file]=="test.db"} {
|
|
lappend ::write_list [expr $iOfst/1024 + 1]
|
|
}
|
|
}
|
|
|
|
do_test 1.2 {
|
|
sqlite3 db test.db -vfs tvfs
|
|
set ::write_list [list]
|
|
execsql { CREATE INDEX i1 ON t1(x) }
|
|
} {}
|
|
|
|
do_test 1.3 {
|
|
set nForward 0
|
|
set nBackward 0
|
|
set nNoncont 0
|
|
set iPrev [lindex $::write_list 0]
|
|
for {set i 1} {$i < [llength $::write_list]} {incr i} {
|
|
set iNext [lindex $::write_list $i]
|
|
if {$iNext==($iPrev+1)} {
|
|
incr nForward
|
|
} elseif {$iNext==($iPrev-1)} {
|
|
incr nBackward
|
|
} else {
|
|
incr nNoncont
|
|
}
|
|
set iPrev $iNext
|
|
}
|
|
if {0} {
|
|
puts -nonewline \
|
|
" (forward=$nForward, back=$nBackward, noncontiguous=$nNoncont)"
|
|
}
|
|
|
|
expr {$nForward > 2*($nBackward + $nNoncont)}
|
|
} {1}
|
|
db close
|
|
tvfs delete
|
|
|
|
finish_test
|