1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Reinstate test cases for the limit tests. The sqlite3_limit() API is now

tested and working. (CVS 4899)

FossilOrigin-Name: 4c4be4c3c8aae97f1d85442b25afba9f0b02c8b3
This commit is contained in:
drh
2008-03-20 16:30:17 +00:00
parent 81a392f7d7
commit b1a6c3c1cc
11 changed files with 416 additions and 238 deletions

View File

@@ -735,14 +735,17 @@ void sqlite3StrAccumAppend(StrAccum *p, const char *z, int N){
return;
}
}else{
p->nAlloc += p->nAlloc + N + 1;
if( p->nAlloc > p->mxAlloc ){
i64 szNew = p->nAlloc;
szNew += N + 1;
if( szNew > p->mxAlloc ){
p->nAlloc = p->mxAlloc;
if( p->nChar+N >= p->nAlloc ){
if( ((i64)p->nChar)+((i64)N) >= p->nAlloc ){
sqlite3StrAccumReset(p);
p->tooBig = 1;
return;
}
}else{
p->nAlloc = szNew;
}
zNew = sqlite3_malloc( p->nAlloc );
if( zNew ){