1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Do not allocate new Trigger objects in the parser following a syntax error,

to avoid violating invariants associated with Expr nodes.  See
[forum:/forumpost/2024e94071ef1531|forum thread 2024e94071ef1531] for more
information.

FossilOrigin-Name: 5e0ed49b3d739d292f5df3e498449ae8f4357cbb83394181fb34f98ed8372707
This commit is contained in:
drh
2022-03-07 16:22:31 +00:00
parent 6d6ea42a25
commit 4c460bbffd
4 changed files with 20 additions and 8 deletions

View File

@ -827,4 +827,15 @@ do_execsql_test trigger1-22.10 {
SELECT a, CASE WHEN typeof(b)='text' THEN quote(b) ELSE '<blob>' END, '|' FROM t1;
} {1 <blob> | 2 'X' | 3 'Z' |}
# 2022-03-06 https://sqlite.org/forum/forumpost/2024e94071
# Harmless assertion fault following a syntax error.
#
reset_db
do_catchsql_test trigger1-23.1 {
CREATE TABLE t1(a INT);
CREATE TRIGGER r1 AFTER INSERT ON t1 BEGIN
INSERT INTO t1 SELECT e_master LIMIT 1,#1;
END;
} {1 {near "#1": syntax error}}
finish_test