mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
In the fts3view utility, label the blank segments used to mark the end of a
segment sequence for a level/idx as "null". Improve the alignment of root segment names. FossilOrigin-Name: 04aea0245e4183fef3664609f5a6353b65d71a85
This commit is contained in:
@@ -418,6 +418,22 @@ static void printTreeLine(sqlite3_int64 iLower, sqlite3_int64 iUpper){
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
/*
|
||||
** Check to see if the block of a %_segments entry is NULL.
|
||||
*/
|
||||
static int isNullSegment(sqlite3 *db, const char *zTab, sqlite3_int64 iBlockId){
|
||||
sqlite3_stmt *pStmt;
|
||||
int rc = 1;
|
||||
|
||||
pStmt = prepare(db, "SELECT block IS NULL FROM '%q_segments'"
|
||||
" WHERE blockid=%lld", zTab, iBlockId);
|
||||
if( sqlite3_step(pStmt)==SQLITE_ROW ){
|
||||
rc = sqlite3_column_int(pStmt, 0);
|
||||
}
|
||||
sqlite3_finalize(pStmt);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
** Show a map of segments derived from the %_segdir table.
|
||||
*/
|
||||
@@ -459,13 +475,16 @@ static void showSegdirMap(sqlite3 *db, const char *zTab){
|
||||
sqlite3_int64 iStart = sqlite3_column_int64(pStmt, 2);
|
||||
sqlite3_int64 iLEnd = sqlite3_column_int64(pStmt, 3);
|
||||
sqlite3_int64 iEnd = sqlite3_column_int64(pStmt, 4);
|
||||
char rtag[20];
|
||||
if( iLevel!=prevLevel ){
|
||||
printf("level %2d idx %2d", iLevel, iIdx);
|
||||
prevLevel = iLevel;
|
||||
}else{
|
||||
printf(" idx %2d", iIdx);
|
||||
}
|
||||
printf(" root r%lld\n", sqlite3_column_int64(pStmt, 5));
|
||||
sqlite3_snprintf(sizeof(rtag), rtag, "r%lld",
|
||||
sqlite3_column_int64(pStmt,5));
|
||||
printf(" root %9s\n", rtag);
|
||||
if( iLEnd>iStart ){
|
||||
sqlite3_int64 iLower, iPrev, iX;
|
||||
if( iLEnd+1<=iEnd ){
|
||||
@@ -484,7 +503,15 @@ static void showSegdirMap(sqlite3 *db, const char *zTab){
|
||||
}
|
||||
}
|
||||
sqlite3_reset(pStmt2);
|
||||
if( iLower>=0 ) printTreeLine(iLower, iPrev);
|
||||
if( iLower>=0 ){
|
||||
if( iLower==iPrev && iLower==iEnd
|
||||
&& isNullSegment(db,zTab,iLower)
|
||||
){
|
||||
printf(" null %9lld\n", iLower);
|
||||
}else{
|
||||
printTreeLine(iLower, iPrev);
|
||||
}
|
||||
}
|
||||
}
|
||||
printf(" leaves %9lld thru %9lld (%lld blocks)\n",
|
||||
iStart, iLEnd, iLEnd - iStart + 1);
|
||||
|
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
||||
C Enhance\sthe\sfts3view\stool\swith\sthe\sbig-segment\scommand\sand\sfix\sa\sbug\sin\sthe\ndisplay\sof\sdoclists.
|
||||
D 2012-03-27T13:51:31.240
|
||||
C In\sthe\sfts3view\sutility,\slabel\sthe\sblank\ssegments\sused\sto\smark\sthe\send\sof\sa\nsegment\ssequence\sfor\sa\slevel/idx\sas\s"null".\s\sImprove\sthe\salignment\sof\sroot\nsegment\snames.
|
||||
D 2012-03-27T14:54:44.486
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 2f37e468503dbe79d35c9f6dffcf3fae1ae9ec20
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@@ -81,7 +81,7 @@ F ext/fts3/fts3_tokenizer1.c 5c98225a53705e5ee34824087478cf477bdb7004
|
||||
F ext/fts3/fts3_write.c a9990753ba132cd79b666c61ec58ae15eb032387
|
||||
F ext/fts3/fts3speed.tcl b54caf6a18d38174f1a6e84219950d85e98bb1e9
|
||||
F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100
|
||||
F ext/fts3/tool/fts3view.c 153b47ecb91856f8462fa8b8320762ad62ca965a
|
||||
F ext/fts3/tool/fts3view.c 2c7f1bc1feddca85397be174fb6871007c27898b
|
||||
F ext/icu/README.txt bf8461d8cdc6b8f514c080e4e10dc3b2bbdfefa9
|
||||
F ext/icu/icu.c eb9ae1d79046bd7871aa97ee6da51eb770134b5a
|
||||
F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37
|
||||
@@ -1000,7 +1000,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
|
||||
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
|
||||
P eb00b95885023a8592693f0babbb0066207073b0
|
||||
R 6a5cd3e2138fd11a98667226e3dd3f73
|
||||
P e9436d8038e5a0d1ba992a77d1064d4a55595f57
|
||||
R 539ad1cd9b19a07386b41fe8ff2433cc
|
||||
U drh
|
||||
Z d39fd2dac9646b20152fd68106b6fe3c
|
||||
Z cd0ad279479f240b2399ce3360a34f55
|
||||
|
@@ -1 +1 @@
|
||||
e9436d8038e5a0d1ba992a77d1064d4a55595f57
|
||||
04aea0245e4183fef3664609f5a6353b65d71a85
|
Reference in New Issue
Block a user