/ Check-in [a134e6e7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a testcase() macro to ensure that the sqlite3AuthCheck() call inside the query flattener really is effective.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a134e6e739cbb27701b092b33033244feb164cdf
User & Date: drh 2012-04-11 23:22:37
Context
2012-04-14
11:48
Fix a typo in a comment that is extracted for documentation. No changes to code. check-in: e87371c5 user: drh tags: trunk
2012-04-11
23:22
Add a testcase() macro to ensure that the sqlite3AuthCheck() call inside the query flattener really is effective. check-in: a134e6e7 user: drh tags: trunk
11:38
Fix harmless static-analysis warnings, mosting having to do with memory leaks in the command-line shell. Add a clang analysis of the command-line shell to the "warnings-clang.sh" script. Other minor cleanups to the command-line shell code. check-in: 93a0f452 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/select.c.

2847
2848
2849
2850
2851
2852
2853
2854

2855
2856
2857
2858
2859
2860
2861
    }
  }

  /***** If we reach this point, flattening is permitted. *****/

  /* Authorize the subquery */
  pParse->zAuthContext = pSubitem->zName;
  sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0);

  pParse->zAuthContext = zSavedAuthContext;

  /* If the sub-query is a compound SELECT statement, then (by restrictions
  ** 17 and 18 above) it must be a UNION ALL and the parent query must 
  ** be of the form:
  **
  **     SELECT <expr-list> FROM (<sub-query>) <where-clause> 







|
>







2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
    }
  }

  /***** If we reach this point, flattening is permitted. *****/

  /* Authorize the subquery */
  pParse->zAuthContext = pSubitem->zName;
  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
  ** 17 and 18 above) it must be a UNION ALL and the parent query must 
  ** be of the form:
  **
  **     SELECT <expr-list> FROM (<sub-query>) <where-clause>