/ Check-in [64f02699]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a division-by-zero error in the fts3view utility program. Add the fts3view utility program to the "main.mk" makefile.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 64f02699b4bd747e4c2f0debf72d37ec275137d8
User & Date: drh 2014-07-07 16:07:43
Context
2014-07-07
17:57
Add the fts3view utility program to the MSVC makefile. check-in: b04751bd user: mistachkin tags: trunk
16:07
Fix a division-by-zero error in the fts3view utility program. Add the fts3view utility program to the "main.mk" makefile. check-in: 64f02699 user: drh tags: trunk
2014-07-03
12:18
Change fts3/4 so that the "unicode61" is included in builds by default. It may now be excluded by defining SQLITE_DISABLE_FTS3_UNICODE. check-in: 0cc0230a user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts3/tool/fts3view.c.

   372    372     n = 0;
   373    373     while( sqlite3_step(pStmt)==SQLITE_ROW ){
   374    374       n = sqlite3_column_int(pStmt, 0);
   375    375     }
   376    376     sqlite3_finalize(pStmt);
   377    377     nLeaf = nSeg - nIdx;
   378    378     printf("Leaf segments larger than %5d bytes.... %9d   %5.2f%%\n",
   379         -         pgsz-45, n, n*100.0/nLeaf);
          379  +         pgsz-45, n, nLeaf>0 ? n*100.0/nLeaf : 0.0);
   380    380   
   381    381     pStmt = prepare(db, "SELECT max(level%%1024) FROM '%q_segdir'", zTab);
   382    382     mxLevel = 0;
   383    383     while( sqlite3_step(pStmt)==SQLITE_ROW ){
   384    384       mxLevel = sqlite3_column_int(pStmt, 0);
   385    385     }
   386    386     sqlite3_finalize(pStmt);

Changes to main.mk.

   639    639   showjournal$(EXE):	$(TOP)/tool/showjournal.c sqlite3.o
   640    640   	$(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o showjournal$(EXE) \
   641    641   		$(TOP)/tool/showjournal.c sqlite3.o $(THREADLIB)
   642    642   
   643    643   showwal$(EXE):	$(TOP)/tool/showwal.c sqlite3.o
   644    644   	$(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o showwal$(EXE) \
   645    645   		$(TOP)/tool/showwal.c sqlite3.o $(THREADLIB)
          646  +
          647  +fts3view$(EXE):	$(TOP)/ext/fts3/tool/fts3view.c sqlite3.o
          648  +	$(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o fts3view$(EXE) \
          649  +		$(TOP)/ext/fts3/tool/fts3view.c sqlite3.o $(THREADLIB)
   646    650   
   647    651   rollback-test$(EXE):	$(TOP)/tool/rollback-test.c sqlite3.o
   648    652   	$(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o rollback-test$(EXE) \
   649    653   		$(TOP)/tool/rollback-test.c sqlite3.o $(THREADLIB)
   650    654   
   651    655   LogEst$(EXE):	$(TOP)/tool/logest.c sqlite3.h
   652    656   	$(TCC) -o LogEst$(EXE) $(TOP)/tool/logest.c