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
91 lines
2.5 KiB
Plaintext
91 lines
2.5 KiB
Plaintext
# 2007 Oct 3
|
|
#
|
|
# 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 is to test that ticket #2767 has been fixed.
|
|
# Ticket #2767 is for a VDBE stack overflow on BEFORE
|
|
# triggers that run RAISE(IGNORE).
|
|
#
|
|
# $Id: tkt2767.test,v 1.3 2009/04/07 14:14:23 danielk1977 Exp $
|
|
#
|
|
|
|
set testdir [file dirname $argv0]
|
|
source $testdir/tester.tcl
|
|
|
|
ifcapable !trigger { finish_test ; return }
|
|
|
|
do_test tkt2767-1.1 {
|
|
execsql {
|
|
-- Construct a table with many rows of data
|
|
CREATE TABLE t1(x);
|
|
INSERT INTO t1 VALUES(1);
|
|
INSERT INTO t1 VALUES(2);
|
|
INSERT INTO t1 SELECT x+2 FROM t1;
|
|
INSERT INTO t1 SELECT x+4 FROM t1;
|
|
INSERT INTO t1 SELECT x+8 FROM t1;
|
|
INSERT INTO t1 SELECT x+16 FROM t1;
|
|
|
|
-- BEFORE triggers that invoke raise(ignore). The effect of
|
|
-- these triggers should be to make INSERTs, UPDATEs, and DELETEs
|
|
-- into no-ops.
|
|
CREATE TRIGGER r1 BEFORE UPDATE ON t1 BEGIN
|
|
SELECT raise(ignore);
|
|
END;
|
|
CREATE TRIGGER r2 BEFORE DELETE ON t1 BEGIN
|
|
SELECT raise(ignore);
|
|
END;
|
|
CREATE TRIGGER r3 BEFORE INSERT ON t1 BEGIN
|
|
SELECT raise(ignore);
|
|
END;
|
|
|
|
-- Verify the table content
|
|
SELECT count(*), sum(x) FROM t1;
|
|
}
|
|
} {32 528}
|
|
|
|
# Try to delete all elements of the table. This will invoke the
|
|
# DELETE trigger 32 times, which should overflow the VDBE stack if
|
|
# the problem of #2767 is not fixed. If the problem is fixed, all
|
|
# the deletes should be no-ops so the table should remain unchanged.
|
|
#
|
|
do_test tkt2767-1.2 {
|
|
execsql {
|
|
DELETE FROM t1 WHERE x>0;
|
|
SELECT count(*), sum(x) FROM t1;
|
|
}
|
|
} {32 528}
|
|
|
|
# Try to update all elements of the table. This will invoke the
|
|
# UPDATE trigger 32 times, which should overflow the VDBE stack if
|
|
# the problem of #2767 is not fixed. If the problem is fixed, all
|
|
# the updates should be no-ops so the table should remain unchanged.
|
|
#
|
|
do_test tkt2767-1.3 {
|
|
execsql {
|
|
UPDATE t1 SET x=x+1;
|
|
SELECT count(*), sum(x) FROM t1;
|
|
}
|
|
} {32 528}
|
|
|
|
# Invoke the insert trigger. The insert trigger was working
|
|
# even prior to the fix of #2767. But it seems good to go ahead
|
|
# and verify that it works.
|
|
#
|
|
do_test tkt2767-1.4 {
|
|
execsql {
|
|
INSERT INTO t1 SELECT x+32 FROM t1;
|
|
SELECT count(*), sum(x) FROM t1;
|
|
}
|
|
} {32 528}
|
|
|
|
|
|
|
|
finish_test
|