aboutsummaryrefslogtreecommitdiff
path: root/src/build.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-06-26 11:43:18 +0000
committerdrh <drh@noemail.net>2013-06-26 11:43:18 +0000
commit4580cfb93ea377f5bae4a182cf6d1e15deade81e (patch)
treee5de67133da8d3d85a535ca836ef279de4bc0445 /src/build.c
parentadbae616bdbbd264514df275958ef566250b524b (diff)
parent2c036cff3d2fa5e993448ef1aeaf9e1eab388749 (diff)
downloadsqlite-4580cfb93ea377f5bae4a182cf6d1e15deade81e.tar.gz
sqlite-4580cfb93ea377f5bae4a182cf6d1e15deade81e.zip
Cut over the next generation query planner. Increase the version number
to 3.8.0. FossilOrigin-Name: 0fe31f60cadc5fe5a9d87e110bfaed5fd026cba1
Diffstat (limited to 'src/build.c')
-rw-r--r--src/build.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/build.c b/src/build.c
index 067b72f7d..0a3922c95 100644
--- a/src/build.c
+++ b/src/build.c
@@ -2696,6 +2696,7 @@ Index *sqlite3CreateIndex(
pIndex->pTable = pTab;
pIndex->nColumn = pList->nExpr;
pIndex->onError = (u8)onError;
+ pIndex->uniqNotNull = onError==OE_Abort;
pIndex->autoIndex = (u8)(pName==0);
pIndex->pSchema = db->aDb[iDb].pSchema;
assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
@@ -2754,6 +2755,7 @@ Index *sqlite3CreateIndex(
pIndex->azColl[i] = zColl;
requestedSortOrder = pListItem->sortOrder & sortOrderMask;
pIndex->aSortOrder[i] = (u8)requestedSortOrder;
+ if( pTab->aCol[j].notNull==0 ) pIndex->uniqNotNull = 0;
}
sqlite3DefaultRowEst(pIndex);
@@ -3185,7 +3187,7 @@ SrcList *sqlite3SrcListEnlarge(
}
pSrc = pNew;
nGot = (sqlite3DbMallocSize(db, pNew) - sizeof(*pSrc))/sizeof(pSrc->a[0])+1;
- pSrc->nAlloc = (u16)nGot;
+ pSrc->nAlloc = (u8)nGot;
}
/* Move existing slots that come after the newly inserted slots
@@ -3193,7 +3195,7 @@ SrcList *sqlite3SrcListEnlarge(
for(i=pSrc->nSrc-1; i>=iStart; i--){
pSrc->a[i+nExtra] = pSrc->a[i];
}
- pSrc->nSrc += (i16)nExtra;
+ pSrc->nSrc += (i8)nExtra;
/* Zero the newly allocated slots */
memset(&pSrc->a[iStart], 0, sizeof(pSrc->a[0])*nExtra);