Merge various enhancements that were being held on a branch until after the

3.46.0 release.  (1) Allow arbitrary expressions in the second argument to
the RAISE() function. (2) Performance optimization to the OP_OpenRead and
OP_OpenWrite bytecode operators. (3) Allow FTS5 tables to be dropped even if
the associated tokenizer is not available.  (4) Performance optimizations in
FTS5.  (5) Generate better bytecode to improve performance of ONEROW scans.

FossilOrigin-Name: 1e5385ffc30743412ade1536583504eec36790cac5355042aa1e12d8d2271d1f
This commit is contained in:
drh
2024-05-23 15:05:57 +00:00
18 changed files with 262 additions and 121 deletions
+1 -1
View File
@@ -424,7 +424,7 @@ do_catchsql_test colname-9.400 {
#
do_catchsql_test colname-9.410 {
CREATE TABLE t5 AS SELECT RAISE(abort,a);
} {1 {RAISE() may only be used within a trigger-program}}
} {1 {no such column: a}}
# Make sure the quotation marks get removed from the column names
# when constructing a new table from an aggregate SELECT.
+13
View File
@@ -838,4 +838,17 @@ do_catchsql_test trigger1-23.1 {
END;
} {1 {near "#1": syntax error}}
# 2024-05-08 Allow arbitrary expressions as the 2nd argument to RAISE().
#
do_catchsql_test trigger1-24.1 {
CREATE TRIGGER r1 AFTER INSERT ON t1 BEGIN
SELECT raise(abort,format('attempt to insert %d where is not a power of 2',new.a))
WHERE (new.a & (new.a-1))!=0;
END;
INSERT INTO t1 VALUES(0),(1),(2),(4),(8),(65536);
} {0 {}}
do_catchsql_test trigger1-24.2 {
INSERT INTO t1 VALUES(9876);
} {1 {attempt to insert 9876 where is not a power of 2}}
finish_test