mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Performance improvements and test cases added. Allow "PRAGMA trusted_schema=ON"
FossilOrigin-Name: 30882ca80f6c51f6bb7b2692c1ac3f19a7c61a23aa8730be79aec0ae3ef08d54
This commit is contained in:
@ -789,7 +789,7 @@ do_test 17.6.2 {
|
||||
|
||||
do_test 17.6.3 {
|
||||
list [catch { db function xyz -n object ret } msg] $msg
|
||||
} {1 {bad option "-n": must be -argcount, -deterministic, -directonly, or -returntype}}
|
||||
} {1 {bad option "-n": must be -argcount, -deterministic, -directonly, -innocuous, or -returntype}}
|
||||
|
||||
# 2019-02-28: The "bind_fallback" command.
|
||||
#
|
||||
|
@ -41,4 +41,38 @@ do_catchsql_test 1.140 {
|
||||
SELECT a, b, c FROM t1;
|
||||
} {1 {unsafe use of f2()}}
|
||||
|
||||
do_catchsql_test 1.200 {
|
||||
CREATE TABLE t2(a,b,c,CHECK(f3(c)==c));
|
||||
} {1 {unsafe use of f3()}}
|
||||
do_catchsql_test 1.210 {
|
||||
PRAGMA trusted_schema=Off;
|
||||
CREATE TABLE t2(a,b,c,CHECK(f2(c)==c));
|
||||
} {1 {unsafe use of f2()}}
|
||||
do_catchsql_test 1.211 {
|
||||
PRAGMA trusted_schema=On;
|
||||
CREATE TABLE t2(a,b,c,CHECK(f2(c)==c));
|
||||
} {0 {}}
|
||||
do_catchsql_test 1.220 {
|
||||
INSERT INTO t2 VALUES(1,2,3);
|
||||
SELECT * FROM t2;
|
||||
} {0 {1 2 3}}
|
||||
do_catchsql_test 1.230 {
|
||||
PRAGMA trusted_schema=off;
|
||||
INSERT INTO t2 VALUES(4,5,6);
|
||||
} {1 {unsafe use of f2()}}
|
||||
do_execsql_test 1.231 {
|
||||
SELECT * FROM t2;
|
||||
} {1 2 3}
|
||||
|
||||
do_catchsql_test 1.300 {
|
||||
CREATE TABLE t3(a,b DEFAULT(f2(25)));
|
||||
} {0 {}}
|
||||
do_catchsql_test 1.310 {
|
||||
PRAGMA trusted_schema=Off;
|
||||
INSERT INTO t3(a) VALUES(1);
|
||||
} {1 {unsafe use of f2()}}
|
||||
do_catchsql_test 1.311 {
|
||||
INSERT INTO t3(a,b) VALUES(1,2);
|
||||
} {0 {}}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user