| OLD | NEW |
| (Empty) | |
| 1 From a865aa662a71764bdb72ab4340b536e4c42011ee Mon Sep 17 00:00:00 2001 |
| 2 From: Scott Hess <shess@chromium.org> |
| 3 Date: Thu, 23 Jun 2011 04:17:45 +0000 |
| 4 Subject: [PATCH 12/23] [fts3][backport] Fix bug when PRAGMA is not authorized. |
| 5 |
| 6 WebDatabase uses an authorizer to prevent inappropriate access. fts3.c |
| 7 uses 'PRAGMA page_size' to tune the query optimizer, but PRAGMA is on |
| 8 the disallowed list. This patch adds a default return value for |
| 9 SQLITE_AUTH failures. |
| 10 |
| 11 BUG=85522 |
| 12 |
| 13 Original review URL: http://codereview.chromium.org/7230021 |
| 14 |
| 15 This is upstreamed at: http://www.sqlite.org/src/info/ba39382ef5 |
| 16 --- |
| 17 third_party/sqlite/src/ext/fts3/fts3.c | 3 +++ |
| 18 1 file changed, 3 insertions(+) |
| 19 |
| 20 diff --git a/third_party/sqlite/src/ext/fts3/fts3.c b/third_party/sqlite/src/ext
/fts3/fts3.c |
| 21 index 7accb11..da55f2a 100644 |
| 22 --- a/third_party/sqlite/src/ext/fts3/fts3.c |
| 23 +++ b/third_party/sqlite/src/ext/fts3/fts3.c |
| 24 @@ -630,6 +630,9 @@ static void fts3DatabasePageSize(int *pRc, Fts3Table *p){ |
| 25 sqlite3_step(pStmt); |
| 26 p->nPgsz = sqlite3_column_int(pStmt, 0); |
| 27 rc = sqlite3_finalize(pStmt); |
| 28 + }else if( rc==SQLITE_AUTH ){ |
| 29 + p->nPgsz = 1024; |
| 30 + rc = SQLITE_OK; |
| 31 } |
| 32 } |
| 33 assert( p->nPgsz>0 || rc!=SQLITE_OK ); |
| 34 -- |
| 35 2.2.1 |
| 36 |
| OLD | NEW |