diff options
author | mistachkin <mistachkin@noemail.net> | 2015-02-27 19:40:08 +0000 |
---|---|---|
committer | mistachkin <mistachkin@noemail.net> | 2015-02-27 19:40:08 +0000 |
commit | 0404e74caa95a4cde7bdba71ad95d6eb8f924c01 (patch) | |
tree | c0bcde754c3ce16edbf06bfda8d4f0b058054fb5 /src/build.c | |
parent | bfefa4c27b42b74e6b1685a3c93585fd0fa7d666 (diff) | |
parent | 22ec13466cbc6ce4f3cc642e5c23c5d52dcace27 (diff) | |
download | sqlite-0404e74caa95a4cde7bdba71ad95d6eb8f924c01.tar.gz sqlite-0404e74caa95a4cde7bdba71ad95d6eb8f924c01.zip |
Merge updates from trunk.
FossilOrigin-Name: acf7684323da4dc3aaf9746bd13b0f56054a17dd
Diffstat (limited to 'src/build.c')
-rw-r--r-- | src/build.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/build.c b/src/build.c index f02989bff..54dd526b5 100644 --- a/src/build.c +++ b/src/build.c @@ -308,10 +308,6 @@ Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){ Table *p = 0; int i; -#ifdef SQLITE_ENABLE_API_ARMOR - if( !sqlite3SafetyCheckOk(db) || zName==0 ) return 0; -#endif - /* All mutexes are required for schema access. Make sure we hold them. */ assert( zDatabase!=0 || sqlite3BtreeHoldsAllMutexes(db) ); #if SQLITE_USER_AUTHENTICATION @@ -1731,11 +1727,14 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){ assert( pPk!=0 ); nPk = pPk->nKeyCol; - /* Make sure every column of the PRIMARY KEY is NOT NULL */ - for(i=0; i<nPk; i++){ - pTab->aCol[pPk->aiColumn[i]].notNull = 1; + /* Make sure every column of the PRIMARY KEY is NOT NULL. (Except, + ** do not enforce this for imposter tables.) */ + if( !db->init.imposterTable ){ + for(i=0; i<nPk; i++){ + pTab->aCol[pPk->aiColumn[i]].notNull = 1; + } + pPk->uniqNotNull = 1; } - pPk->uniqNotNull = 1; /* The root page of the PRIMARY KEY is the table root page */ pPk->tnum = pTab->tnum; |