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

Simplifications to error message processing. Fix a possible problem in error

message formatting when vacuuming a database with a corrupt schema.

FossilOrigin-Name: 56ef98a04765c34c1c2f3ed7a6f03a732f3b886e
This commit is contained in:
drh
2015-05-15 04:13:15 +00:00
parent f922ca497d
commit 22c17b8bf5
11 changed files with 72 additions and 90 deletions

View File

@@ -931,24 +931,6 @@ char *sqlite3MPrintf(sqlite3 *db, const char *zFormat, ...){
return z;
}
/*
** Like sqlite3MPrintf(), but call sqlite3DbFree() on zStr after formatting
** the string and before returning. This routine is intended to be used
** to modify an existing string. For example:
**
** x = sqlite3MPrintf(db, x, "prefix %s suffix", x);
**
*/
char *sqlite3MAppendf(sqlite3 *db, char *zStr, const char *zFormat, ...){
va_list ap;
char *z;
va_start(ap, zFormat);
z = sqlite3VMPrintf(db, zFormat, ap);
va_end(ap);
sqlite3DbFree(db, zStr);
return z;
}
/*
** Print into memory obtained from sqlite3_malloc(). Omit the internal
** %-conversion extensions.