Improved display of record data in the "NNNbd" output of the showdb.exe

utility program.

FossilOrigin-Name: f735c2497eaad15216c90c6b92fd5ceff460220a
This commit is contained in:
drh 2014-06-20 13:55:06 +00:00
parent 419e04010f
commit 56e67dd7c7
3 changed files with 28 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C In\sthe\sshowdb.exe\sutility,\sfor\sthe\s"NNNbd"\scommand,\salso\sshow\sdata\sfields\nin\saddition\sto\sheader\sfields\son\seach\srecord\sdecoded.\s\sImprovements\sto\s\nformatting.
D 2014-06-20T01:32:42.411
C Improved\sdisplay\sof\srecord\sdata\sin\sthe\s"NNNbd"\soutput\sof\sthe\sshowdb.exe\nutility\sprogram.
D 2014-06-20T13:55:06.139
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in b03432313a3aad96c706f8164fb9f5307eaf19f5
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -1158,7 +1158,7 @@ F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c
F tool/pagesig.c ff0ca355fd3c2398e933da5e22439bbff89b803b
F tool/restore_jrnl.tcl 6957a34f8f1f0f8285e07536225ec3b292a9024a
F tool/rollback-test.c 9fc98427d1e23e84429d7e6d07d9094fbdec65a5
F tool/showdb.c eef4bd98ba995c6a9373cbc0e7b8a3201a658585
F tool/showdb.c b018a8a69d07050fc0fe9afcf17313cdef0cc599
F tool/showjournal.c b62cecaab86a4053d944c276bb5232e4d17ece02
F tool/showwal.c 3f7f7da5ec0cba51b1449a75f700493377da57b5
F tool/soak1.tcl 8d407956e1a45b485a8e072470a3e629a27037fe
@ -1179,7 +1179,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 306b461d7c0643b6ac4df944759ecc9ce8581634
R 1d1b4729d93a91658ee348794dbfb980
P b451fe0cb92278deb7724e7995c1bd46ae83c119
R ed297bdcc3956dc354f00523f5ca1d92
U drh
Z 8ea506b1401ff81840cba469aab2c6cc
Z 0815d87a0909198bac782c1612f71277

View File

@ -1 +1 @@
b451fe0cb92278deb7724e7995c1bd46ae83c119
f735c2497eaad15216c90c6b92fd5ceff460220a

View File

@ -479,8 +479,27 @@ static void decodeCell(
printf("%lld\n", v);
}
}else{
printf("%d bytes of %s\n", szCol[i],
(typeCol[i]&1)==0 ? "BLOB" : "TEXT");
int ii, jj;
char zConst[32];
if( (typeCol[i]&1)==0 ){
zConst[0] = 'x';
zConst[1] = '\'';
for(ii=2, jj=0; jj<szCol[i] && ii<24; jj++, ii+=2){
sprintf(zConst+ii, "%02x", pData[jj]);
}
}else{
zConst[0] = '\'';
for(ii=1, jj=0; jj<szCol[i] && ii<24; jj++, ii++){
zConst[ii] = isprint(pData[jj]) ? pData[jj] : '.';
}
zConst[ii] = 0;
}
if( jj<szCol[i] ){
memcpy(zConst+ii, "...'", 5);
}else{
memcpy(zConst+ii, "'", 2);
}
printf("%s\n", zConst);
}
j = ofstCol[i] + szCol[i];
}