1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +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

@@ -2964,9 +2964,9 @@ struct StrAccum {
sqlite3 *db; /* Optional database for lookaside. Can be NULL */
char *zBase; /* A base allocation. Not from malloc. */
char *zText; /* The string collected so far */
int nChar; /* Length of the string so far */
int nAlloc; /* Amount of space allocated in zText */
int mxAlloc; /* Maximum allowed allocation. 0 for no malloc usage */
u32 nChar; /* Length of the string so far */
u32 nAlloc; /* Amount of space allocated in zText */
u32 mxAlloc; /* Maximum allowed allocation. 0 for no malloc usage */
u8 accError; /* STRACCUM_NOMEM or STRACCUM_TOOBIG */
u8 bMalloced; /* zText points to allocated space */
};