-C Merge\sthe\sSTAT4\scapability\sinto\strunk.
-D 2013-08-26T23:18:06.972
+C In\sthe\sANALYZE\scommand\simplementation\smake\sstatInit()\sa\s2-value\sfunction\nsince\sthe\s3rd\sparameter\swas\salways\sthe\ssame\sconstant.
+D 2013-08-27T14:14:14.669
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F sqlite3.1 6be1ad09113570e1fc8dcaff84c9b0b337db5ffc
F sqlite3.pc.in ae6f59a76e862f5c561eb32a380228a02afc3cad
F src/alter.c 2af0330bb1b601af7a7789bf7229675fd772a083
-F src/analyze.c 10a4f1cda87aec6c56760c66e5feaaf1cdc9a641
+F src/analyze.c ce2a3385ac05f61e07d384b1c7e8c52e6ef1a3a6
F src/attach.c fea00cab11c854646a27641a263f5876569a51f9
F src/auth.c 523da7fb4979469955d822ff9298352d6b31de34
F src/backup.c 2f1987981139bd2f6d8c728d64bf09fb387443c3
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P edd5dbdc3239fc88799b822941603fcc828ecbb6 f86b75b6c7290ee6ddb3636090b00e99fc68c45e
-R f565ac94f1ba86f7abdb8be442158ff1
+P a32af0abe5fa6d570604fa3534e8230d5b6042fc
+R 5b1a9e2b24a504e796d0e448f0b689ac
U drh
-Z 3380b8636b10d59476656dd5f78e188d
+Z 459d7705f4f327bb53f4cbbd349b98f8
};
/*
-** Implementation of the stat_init(C,N,S) SQL function. The three parameters
-** are the number of rows in the table or index (C), the number of columns
-** in the index (N) and the number of samples to accumulate (S).
+** Implementation of the stat_init(C,N) SQL function. The two parameters
+** are the number of rows in the table or index (C) and the number of columns
+** in the index (N).
**
** This routine allocates the Stat4Accum object in heap memory. The return
** value is a pointer to the the Stat4Accum object encoded as a blob (i.e.
/* Decode the three function arguments */
UNUSED_PARAMETER(argc);
nRow = (tRowcnt)sqlite3_value_int64(argv[0]);
- mxSample = sqlite3_value_int(argv[2]);
+ mxSample = SQLITE_STAT4_SAMPLES;
nCol = sqlite3_value_int(argv[1]);
assert( nCol>1 ); /* >1 because it includes the rowid column */
sqlite3_result_blob(context, p, sizeof(p), sqlite3_free);
}
static const FuncDef statInitFuncdef = {
- 3, /* nArg */
+ 2, /* nArg */
SQLITE_UTF8, /* iPrefEnc */
0, /* flags */
0, /* pUserData */
*/
sqlite3VdbeAddOp2(v, OP_Count, iIdxCur, regStat4+1);
sqlite3VdbeAddOp2(v, OP_Integer, nCol+1, regStat4+2);
- sqlite3VdbeAddOp2(v, OP_Integer, SQLITE_STAT4_SAMPLES, regStat4+3);
sqlite3VdbeAddOp3(v, OP_Function, 0, regStat4+1, regStat4);
sqlite3VdbeChangeP4(v, -1, (char*)&statInitFuncdef, P4_FUNCDEF);
- sqlite3VdbeChangeP5(v, 3);
+ sqlite3VdbeChangeP5(v, 2);
/* Implementation of the following:
**