summaryrefslogtreecommitdiff
path: root/src/analyze.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2013-01-17 14:18:26 -0500
committerHans-Christoph Steiner <hans@eds.org>2013-01-17 14:18:26 -0500
commit1b5ba8e022836fa8ab93bc90df1b34a29ea6e134 (patch)
treee2a832468ccbf52965f18c37b3c4e692fe97ed06 /src/analyze.c
parent487e15dc239ccdb3344d1c99ce120e872bab4a74 (diff)
Imported Upstream version 2.1.1
Diffstat (limited to 'src/analyze.c')
-rw-r--r--src/analyze.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/analyze.c b/src/analyze.c
index 4dfc331..632fdc1 100644
--- a/src/analyze.c
+++ b/src/analyze.c
@@ -176,7 +176,7 @@ static void openStatTable(
"CREATE TABLE %Q.%s(%s)", pDb->zName, zTab, aTable[i].zCols
);
aRoot[i] = pParse->regRoot;
- aCreateTbl[i] = 1;
+ aCreateTbl[i] = OPFLAG_P2ISREG;
}else{
/* The table already exists. If zWhere is not NULL, delete all entries
** associated with the table zWhere. If zWhere is NULL, delete the
@@ -256,12 +256,11 @@ static void stat3Init(
nRow = (tRowcnt)sqlite3_value_int64(argv[0]);
mxSample = sqlite3_value_int(argv[1]);
n = sizeof(*p) + sizeof(p->a[0])*mxSample;
- p = sqlite3_malloc( n );
+ p = sqlite3MallocZero( n );
if( p==0 ){
sqlite3_result_error_nomem(context);
return;
}
- memset(p, 0, n);
p->a = (struct Stat3Sample*)&p[1];
p->nRow = nRow;
p->mxSample = mxSample;