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

A new approach to very large sqlite3_mprintf() strings: Back out the

[d655a665] check-in and instead make the size fields in StrAccum unsigned.
Strings generated by sqlite3_mprintf() can now be as large as 2^31-1 bytes.

FossilOrigin-Name: 7adb789f45698e5569b840d23f3f9488db3ed109
This commit is contained in:
drh
2016-01-04 12:07:27 +00:00
parent cc54f43442
commit fa385edff3
5 changed files with 13 additions and 21 deletions

View File

@@ -965,12 +965,7 @@ char *sqlite3_vmprintf(const char *zFormat, va_list ap){
#ifndef SQLITE_OMIT_AUTOINIT
if( sqlite3_initialize() ) return 0;
#endif
#if SQLITE_MAX_LENGTH<0x40000000
sqlite3StrAccumInit(&acc, 0, zBase, sizeof(zBase), SQLITE_MAX_LENGTH);
#else
sqlite3StrAccumInit(&acc, 0, zBase, sizeof(zBase), 0x3fffffff);
#endif
sqlite3VXPrintf(&acc, 0, zFormat, ap);
z = sqlite3StrAccumFinish(&acc);
return z;