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

Testing coverage enhancements. (CVS 5358)

FossilOrigin-Name: fe80aa58a4ac12db5a92d25d28165f5159f04533
This commit is contained in:
drh
2008-07-08 00:06:49 +00:00
parent bd0b1b50f4
commit fb45d8c563
7 changed files with 153 additions and 32 deletions

View File

@@ -22,7 +22,7 @@
** COMMIT
** ROLLBACK
**
** $Id: build.c,v 1.485 2008/06/15 02:51:47 drh Exp $
** $Id: build.c,v 1.486 2008/07/08 00:06:50 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -238,6 +238,7 @@ void sqlite3FinishCoding(Parse *pParse){
void sqlite3NestedParse(Parse *pParse, const char *zFormat, ...){
va_list ap;
char *zSql;
char *zErrMsg = 0;
# define SAVE_SZ (sizeof(Parse) - offsetof(Parse,nVar))
char saveBuf[SAVE_SZ];
@@ -253,7 +254,8 @@ void sqlite3NestedParse(Parse *pParse, const char *zFormat, ...){
pParse->nested++;
memcpy(saveBuf, &pParse->nVar, SAVE_SZ);
memset(&pParse->nVar, 0, SAVE_SZ);
sqlite3RunParser(pParse, zSql, 0);
sqlite3RunParser(pParse, zSql, &zErrMsg);
sqlite3_free(zErrMsg);
sqlite3_free(zSql);
memcpy(&pParse->nVar, saveBuf, SAVE_SZ);
pParse->nested--;