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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user