1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Add a testcase() macro to ensure that the sqlite3AuthCheck() call inside

the query flattener really is effective.

FossilOrigin-Name: a134e6e739cbb27701b092b33033244feb164cdf
This commit is contained in:
drh
2012-04-11 23:22:37 +00:00
parent 85e7243acf
commit a2acb0d769
3 changed files with 9 additions and 8 deletions

View File

@@ -2851,7 +2851,8 @@ static int flattenSubquery(
/* Authorize the subquery */
pParse->zAuthContext = pSubitem->zName;
sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0);
TESTONLY(i =) sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0);
testcase( i==SQLITE_DENY );
pParse->zAuthContext = zSavedAuthContext;
/* If the sub-query is a compound SELECT statement, then (by restrictions