| Index: third_party/sqlite/sqlite-src-3100200/tool/showstat4.c
|
| diff --git a/third_party/sqlite/src/tool/showstat4.c b/third_party/sqlite/sqlite-src-3100200/tool/showstat4.c
|
| similarity index 92%
|
| copy from third_party/sqlite/src/tool/showstat4.c
|
| copy to third_party/sqlite/sqlite-src-3100200/tool/showstat4.c
|
| index 668d2106af270a06fbe17c59d1bdf0f1e06e7e58..c7f9b10fbc2eff34341ff57a1cb1a90e29699069 100644
|
| --- a/third_party/sqlite/src/tool/showstat4.c
|
| +++ b/third_party/sqlite/sqlite-src-3100200/tool/showstat4.c
|
| @@ -9,6 +9,8 @@
|
| #include <ctype.h>
|
| #include "sqlite3.h"
|
|
|
| +#define ISPRINT(X) isprint((unsigned char)(X))
|
| +
|
| typedef sqlite3_int64 i64; /* 64-bit signed integer type */
|
|
|
|
|
| @@ -39,6 +41,7 @@ int main(int argc, char **argv){
|
| int nSample;
|
| i64 iVal;
|
| const char *zSep;
|
| + int iRow = 0;
|
|
|
| if( argc!=2 ){
|
| fprintf(stderr, "Usage: %s DATABASE-FILE\n", argv[0]);
|
| @@ -60,13 +63,13 @@ int main(int argc, char **argv){
|
| }
|
| while( SQLITE_ROW==sqlite3_step(pStmt) ){
|
| if( zIdx==0 || strcmp(zIdx, (const char*)sqlite3_column_text(pStmt,0))!=0 ){
|
| - if( zIdx ) printf("\n");
|
| + if( zIdx ) printf("\n**************************************"
|
| + "**************\n\n");
|
| sqlite3_free(zIdx);
|
| zIdx = sqlite3_mprintf("%s", sqlite3_column_text(pStmt,0));
|
| - printf("%s:\n", zIdx);
|
| - }else{
|
| - printf(" -----------------------------------------------------------\n");
|
| + iRow = 0;
|
| }
|
| + printf("%s sample %d ------------------------------------\n", zIdx, ++iRow);
|
| printf(" nEq = %s\n", sqlite3_column_text(pStmt,1));
|
| printf(" nLt = %s\n", sqlite3_column_text(pStmt,2));
|
| printf(" nDLt = %s\n", sqlite3_column_text(pStmt,3));
|
| @@ -130,7 +133,7 @@ int main(int argc, char **argv){
|
| printf("%s\"", zSep);
|
| for(j=0; j<sz; j++){
|
| char c = (char)aSample[y+j];
|
| - if( isprint(c) ){
|
| + if( ISPRINT(c) ){
|
| if( c=='"' || c=='\\' ) putchar('\\');
|
| putchar(c);
|
| }else if( c=='\n' ){
|
|
|