diff options
author | drh <drh@noemail.net> | 2016-02-05 13:38:36 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-02-05 13:38:36 +0000 |
commit | 575fad6500070ad7fc7f91a8906b0b285965f99a (patch) | |
tree | 02a034f606a55aa903a161878ede6ff87932f75b /src/insert.c | |
parent | 98c7a12c003278d9332c25dc9782e491b7bb0845 (diff) | |
download | sqlite-575fad6500070ad7fc7f91a8906b0b285965f99a.tar.gz sqlite-575fad6500070ad7fc7f91a8906b0b285965f99a.zip |
Add the slightly faster sqlite3DbMallocRawNN(db,n) routine for the majority
cases where db is guaranteed to be not NULL.
FossilOrigin-Name: 0a802e96ab06e2643834b83671fa8353da1a348d
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/insert.c b/src/insert.c index a8cde7295..729e0fedc 100644 --- a/src/insert.c +++ b/src/insert.c @@ -230,7 +230,7 @@ static int autoIncBegin( pInfo = pToplevel->pAinc; while( pInfo && pInfo->pTab!=pTab ){ pInfo = pInfo->pNext; } if( pInfo==0 ){ - pInfo = sqlite3DbMallocRaw(pParse->db, sizeof(*pInfo)); + pInfo = sqlite3DbMallocRawNN(pParse->db, sizeof(*pInfo)); if( pInfo==0 ) return 0; pInfo->pNext = pToplevel->pAinc; pToplevel->pAinc = pInfo; @@ -787,7 +787,7 @@ void sqlite3Insert( int nIdx; nIdx = sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenWrite, 0, -1, 0, &iDataCur, &iIdxCur); - aRegIdx = sqlite3DbMallocRaw(db, sizeof(int)*(nIdx+1)); + aRegIdx = sqlite3DbMallocRawNN(db, sizeof(int)*(nIdx+1)); if( aRegIdx==0 ){ goto insert_cleanup; } |