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
60 lines
1.8 KiB
Plaintext
60 lines
1.8 KiB
Plaintext
# 2015-01-05
|
|
#
|
|
# 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.
|
|
#
|
|
#***********************************************************************
|
|
#
|
|
# This file verifies that INSERT operations with a very large number of
|
|
# VALUE terms works and does not hit the SQLITE_LIMIT_COMPOUND_SELECT limit.
|
|
#
|
|
|
|
set testdir [file dirname $argv0]
|
|
source $testdir/tester.tcl
|
|
set testprefix selectG
|
|
|
|
# Do an INSERT with a VALUES clause that contains 100,000 entries. Verify
|
|
# that this insert happens quickly (in less than 10 seconds). Actually, the
|
|
# insert will normally happen in less than 0.5 seconds on a workstation, but
|
|
# we allow plenty of overhead for slower machines. The speed test checks
|
|
# for an O(N*N) inefficiency that was once in the code and that would make
|
|
# the insert run for over a minute.
|
|
#
|
|
do_test 100 {
|
|
set sql "CREATE TABLE t1(x);\nINSERT INTO t1(x) VALUES"
|
|
for {set i 1} {$i<100000} {incr i} {
|
|
append sql "($i),"
|
|
}
|
|
append sql "($i);"
|
|
set microsec [lindex [time {db eval $sql}] 0]
|
|
db eval {
|
|
SELECT count(x), sum(x), avg(x), $microsec<10000000 FROM t1;
|
|
}
|
|
} {100000 5000050000 50000.5 1}
|
|
|
|
# 2018-01-14. A 100K-entry VALUES clause within a scalar expression does
|
|
# not cause processor stack overflow.
|
|
#
|
|
do_test 110 {
|
|
set sql "SELECT (VALUES"
|
|
for {set i 1} {$i<100000} {incr i} {
|
|
append sql "($i),"
|
|
}
|
|
append sql "($i));"
|
|
db eval $sql
|
|
} {1}
|
|
|
|
# Only the left-most term of a multi-valued VALUES within a scalar
|
|
# expression is evaluated.
|
|
#
|
|
do_test 120 {
|
|
set n [llength [split [db eval "explain $sql"] \n]]
|
|
expr {$n<10}
|
|
} {1}
|
|
|
|
finish_test
|