diff options
author | drh <drh@noemail.net> | 2012-04-11 23:22:37 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2012-04-11 23:22:37 +0000 |
commit | a2acb0d769f23bb24d742581c32c4c2f19f3e827 (patch) | |
tree | a63b6769f2169d895e410dfcd24f2472df850b9a /src | |
parent | 85e7243acfb3cc4edb16f8276e374cd730b5a0a7 (diff) | |
download | sqlite-a2acb0d769f23bb24d742581c32c4c2f19f3e827.tar.gz sqlite-a2acb0d769f23bb24d742581c32c4c2f19f3e827.zip |
Add a testcase() macro to ensure that the sqlite3AuthCheck() call inside
the query flattener really is effective.
FossilOrigin-Name: a134e6e739cbb27701b092b33033244feb164cdf
Diffstat (limited to 'src')
-rw-r--r-- | src/select.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/select.c b/src/select.c index b44220ebc..835d9fd9c 100644 --- a/src/select.c +++ b/src/select.c @@ -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 |