Merge branch '2.3' into 2.4

This commit is contained in:
Johan Wikman 2021-02-08 10:05:23 +02:00
commit 16a15e02be

View File

@ -3751,11 +3751,13 @@ SrcList* sqlite3SrcListCat(sqlite3 *db, SrcList *pHead, SrcList *pTail)
if ( pHead==0 ){
return pTail;
}
/* After call to sqlite3SrcListEnlarge(), pNew->nSrc is already final size. */
int nSrc = pHead->nSrc;
pNew = sqlite3SrcListEnlarge(db, pHead, pTail->nSrc, pHead->nSrc);
if (!db->mallocFailed){
int i;
for(i=0; i<pTail->nSrc; i++){
pNew->a[pNew->nSrc - 1 + i] = pTail->a[i];
pNew->a[nSrc + i] = pTail->a[i];
memset(&pTail->a[i], 0, sizeof(pTail->a[0]));
}
pTail->nSrc = 0;