diff options
Diffstat (limited to 'chromium/third_party/sqlite/patches/0032-Fix-handling-negative-number-of-pages-database-field.patch')
-rw-r--r-- | chromium/third_party/sqlite/patches/0032-Fix-handling-negative-number-of-pages-database-field.patch | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/chromium/third_party/sqlite/patches/0032-Fix-handling-negative-number-of-pages-database-field.patch b/chromium/third_party/sqlite/patches/0032-Fix-handling-negative-number-of-pages-database-field.patch deleted file mode 100644 index 7111acbfd28..00000000000 --- a/chromium/third_party/sqlite/patches/0032-Fix-handling-negative-number-of-pages-database-field.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Victor Costan <pwnall@chromium.org> -Date: Sat, 19 Jan 2019 02:33:28 -0800 -Subject: [PATCH 32/40] Fix handling negative "number-of-pages" database field. - -This backports https://www.sqlite.org/src/info/556dd8922f - -Bug: 922849 ---- - third_party/sqlite/src/src/btree.c | 8 ++++---- - third_party/sqlite/src/src/build.c | 16 +++++++++------- - 2 files changed, 13 insertions(+), 11 deletions(-) - -diff --git a/third_party/sqlite/src/src/btree.c b/third_party/sqlite/src/src/btree.c -index 5eb83736533a..dbff913299a9 100644 ---- a/third_party/sqlite/src/src/btree.c -+++ b/third_party/sqlite/src/src/btree.c -@@ -3007,9 +3007,9 @@ static int newDatabase(BtShared*); - static int lockBtree(BtShared *pBt){ - int rc; /* Result code from subfunctions */ - MemPage *pPage1; /* Page 1 of the database file */ -- int nPage; /* Number of pages in the database */ -- int nPageFile = 0; /* Number of pages in the database file */ -- int nPageHeader; /* Number of pages in the database according to hdr */ -+ u32 nPage; /* Number of pages in the database */ -+ u32 nPageFile = 0; /* Number of pages in the database file */ -+ u32 nPageHeader; /* Number of pages in the database according to hdr */ - - assert( sqlite3_mutex_held(pBt->mutex) ); - assert( pBt->pPage1==0 ); -@@ -3022,7 +3022,7 @@ static int lockBtree(BtShared *pBt){ - ** a valid database file. - */ - nPage = nPageHeader = get4byte(28+(u8*)pPage1->aData); -- sqlite3PagerPagecount(pBt->pPager, &nPageFile); -+ sqlite3PagerPagecount(pBt->pPager, (int*)&nPageFile); - if( nPage==0 || memcmp(24+(u8*)pPage1->aData, 92+(u8*)pPage1->aData,4)!=0 ){ - nPage = nPageFile; - } -diff --git a/third_party/sqlite/src/src/build.c b/third_party/sqlite/src/src/build.c -index 806c89f439bf..5939fa9974a8 100644 ---- a/third_party/sqlite/src/src/build.c -+++ b/third_party/sqlite/src/src/build.c -@@ -4417,13 +4417,15 @@ static int collationMatch(const char *zColl, Index *pIndex){ - */ - #ifndef SQLITE_OMIT_REINDEX - static void reindexTable(Parse *pParse, Table *pTab, char const *zColl){ -- Index *pIndex; /* An index associated with pTab */ -- -- for(pIndex=pTab->pIndex; pIndex; pIndex=pIndex->pNext){ -- if( zColl==0 || collationMatch(zColl, pIndex) ){ -- int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema); -- sqlite3BeginWriteOperation(pParse, 0, iDb); -- sqlite3RefillIndex(pParse, pIndex, -1); -+ if (! IsVirtual(pTab) ){ -+ Index *pIndex; /* An index associated with pTab */ -+ -+ for(pIndex=pTab->pIndex; pIndex; pIndex=pIndex->pNext){ -+ if( zColl==0 || collationMatch(zColl, pIndex) ){ -+ int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema); -+ sqlite3BeginWriteOperation(pParse, 0, iDb); -+ sqlite3RefillIndex(pParse, pIndex, -1); -+ } - } - } - } --- -2.18.0 - |