diff options
author | drh <drh@noemail.net> | 2016-09-16 11:53:10 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-09-16 11:53:10 +0000 |
commit | a0daa751f85d7150e8fe4b143253d6f771204d46 (patch) | |
tree | 709e24ab2cf7ae98e78d0a33252f5c6d4cfac1cb /src/insert.c | |
parent | 760c8162fffd53f660adf4b3cdaf7aee7070d845 (diff) | |
download | sqlite-a0daa751f85d7150e8fe4b143253d6f771204d46.tar.gz sqlite-a0daa751f85d7150e8fe4b143253d6f771204d46.zip |
Fix SQLITE_OMIT_AUTHORIZATION so that it compiles cleanly.
FossilOrigin-Name: a3e3b3e1c57178ccd38fc7375ec1de8e8ae45372
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/insert.c b/src/insert.c index f7dec3ca2..9525d823b 100644 --- a/src/insert.c +++ b/src/insert.c @@ -485,7 +485,6 @@ void sqlite3Insert( sqlite3 *db; /* The main database structure */ Table *pTab; /* The table to insert into. aka TABLE */ char *zTab; /* Name of the table into which we are inserting */ - const char *zDb; /* Name of the database holding this table */ int i, j, idx; /* Loop counters */ Vdbe *v; /* Generate code into this virtual machine */ Index *pIdx; /* For looping over indices of the table */ @@ -500,7 +499,6 @@ void sqlite3Insert( int addrCont = 0; /* Top of insert loop. Label "C" in templates 3 and 4 */ SelectDest dest; /* Destination for SELECT on rhs of INSERT */ int iDb; /* Index of database holding TABLE */ - Db *pDb; /* The database containing table being inserted into */ u8 useTempTable = 0; /* Store SELECT results in intermediate table */ u8 appendFlag = 0; /* True if the insert is likely to be an append */ u8 withoutRowid; /* 0 for normal table. 1 for WITHOUT ROWID table */ @@ -550,9 +548,8 @@ void sqlite3Insert( } iDb = sqlite3SchemaToIndex(db, pTab->pSchema); assert( iDb<db->nDb ); - pDb = &db->aDb[iDb]; - zDb = pDb->zDbSName; - if( sqlite3AuthCheck(pParse, SQLITE_INSERT, pTab->zName, 0, zDb) ){ + if( sqlite3AuthCheck(pParse, SQLITE_INSERT, pTab->zName, 0, + db->aDb[iDb].zDbSName) ){ goto insert_cleanup; } withoutRowid = !HasRowid(pTab); |