1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix JSON functions so that they work correctly under PRAGMA trusted_schema.

[forum:/forumpost/c88a671ad083d153|Forum thread c88a671ad083d153].

FossilOrigin-Name: 51a5d83c425d2e31508b73074d0076156817afb19003f847d16bf4a69ae5077b
This commit is contained in:
drh
2023-01-09 12:01:30 +00:00
parent 4ff47d3e37
commit 6791891f92
5 changed files with 32 additions and 15 deletions

View File

@ -247,5 +247,16 @@ do_execsql_test 3.131 {
SELECT * FROM t2;
} {}
# 2023-01-09 https://sqlite.org/forum/forumpost/c88a671ad083d153
#
do_execsql_test 4.1 {
PRAGMA trusted_schema=OFF;
CREATE VIEW test41(x) AS SELECT json_extract('{"a":123}','$.a');
SELECT * FROM test41;
} 123
do_execsql_test 4.2 {
PRAGMA trusted_schema=ON;
SELECT * FROM test41;
} 123
finish_test