From: drh Date: Fri, 18 Mar 2005 14:03:15 +0000 (+0000) Subject: Remove unused code from util.c. Enhance the trace output in os_unix.c. (CVS 2397) X-Git-Tag: version-3.6.10~3761 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e29b915e9bb54c11119d520757079cea1e5d652a;p=thirdparty%2Fsqlite.git Remove unused code from util.c. Enhance the trace output in os_unix.c. (CVS 2397) FossilOrigin-Name: f2f31919fdd181c79b86f849d46c60f1ed7a0db1 --- diff --git a/manifest b/manifest index 086c6bf9d7..fcc9a8875f 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fixed\sa\stypo\sin\salter3.test.\s(CVS\s2396) -D 2005-03-17T12:33:14 +C Remove\sunused\scode\sfrom\sutil.c.\s\sEnhance\sthe\strace\soutput\sin\sos_unix.c.\s(CVS\s2397) +D 2005-03-18T14:03:15 F Makefile.in 5c00d0037104de2a50ac7647a5f12769795957a3 F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7 F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1 @@ -48,7 +48,7 @@ F src/os.h 0c805df3df02b98eb78a7a86756c3cbd4e190939 F src/os_common.h 0e7f428ba0a6c40a61bc56c4e96f493231301b73 F src/os_test.c 91e5f22dd89491e5e1554820e715805f43fa4ece F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3 -F src/os_unix.c d4823c6b3dd86e8cbb6a8f9d2fd6c4b3e722f8ee +F src/os_unix.c fba0167576f09e242afd4c4978e1d2944b1da8b5 F src/os_unix.h 40b2fd1d02cfa45d6c3dea25316fd019cf9fcb0c F src/os_win.c bddeae1c3299be0fbe47077dd4e98b786a067f71 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b @@ -73,7 +73,7 @@ F src/tokenize.c 103cbaa932c790f540f8eceb63cd3010e117bdff F src/trigger.c 0c3ec8a6cb7176aaecc3978bfc34050ec1a852c4 F src/update.c 42823d00865c9fe4f01b3c62647858726345a28e F src/utf.c bda5eb85039ef16f2d17004c1e18c96e1ab0a80c -F src/util.c a53b6fc6f09093ecba1ce593ca7cb1cb77b3a20b +F src/util.c 02bc2750336b021b3f10e61538f665c4b0033b5d F src/vacuum.c 5cf598003191bd91c17a64742bad8e46241698a8 F src/vdbe.c 086e4b42d57af68fceb8c04a6e4eed901777d942 F src/vdbe.h 7e307333d74e134eff237bb9d45fe764e544ad6a @@ -277,7 +277,7 @@ F www/tclsqlite.tcl e73f8f8e5f20e8277619433f7970060ab01088fc F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0 F www/whentouse.tcl 3e522a06ad41992023c80ca29a048ae2331ca5bd -P 800fb3bf06f73af53af57f5b172c85406af374ad -R ba10e0ea6358a224f231b7ca767b2ccf +P 698be25d3e8f0eb2b5a4c6c7d20343b3c8a06134 +R 8611ce54c1361038076da5f3886275d5 U drh -Z 8dab2cd1f570ecdb07ff4ba5a2a7d53e +Z d647977318d4fd6baeb9f9cedb4c633a diff --git a/manifest.uuid b/manifest.uuid index 49329c08ac..0dd78fb99d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -698be25d3e8f0eb2b5a4c6c7d20343b3c8a06134 \ No newline at end of file +f2f31919fdd181c79b86f849d46c60f1ed7a0db1 \ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index 97e3fe73bc..83de58f030 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -644,7 +644,7 @@ int sqlite3OsRead(OsFile *id, void *pBuf, int amt){ TIMER_START; got = read(id->h, pBuf, amt); TIMER_END; - TRACE4("READ %-3d %7d %d\n", id->h, last_page, TIMER_ELAPSED); + TRACE5("READ %-3d %5d %7d %d\n", id->h, got, last_page, TIMER_ELAPSED); SEEK(0); /* if( got<0 ) got = 0; */ if( got==amt ){ @@ -670,7 +670,7 @@ int sqlite3OsWrite(OsFile *id, const void *pBuf, int amt){ pBuf = &((char*)pBuf)[wrote]; } TIMER_END; - TRACE4("WRITE %-3d %7d %d\n", id->h, last_page, TIMER_ELAPSED); + TRACE5("WRITE %-3d %5d %7d %d\n", id->h, wrote, last_page, TIMER_ELAPSED); SEEK(0); if( amt>0 ){ return SQLITE_FULL; @@ -941,7 +941,7 @@ int sqlite3OsLock(OsFile *id, int locktype){ int s; assert( id->isOpen ); - TRACE7("LOCK %d %s was %s(%s,%d) pid=%d\n", id->h, locktypeName(locktype), + TRACE7("LOCK %d %s was %s(%s,%d) pid=%d\n", id->h, locktypeName(locktype), locktypeName(id->locktype), locktypeName(pLock->locktype), pLock->cnt ,getpid() ); @@ -950,7 +950,7 @@ int sqlite3OsLock(OsFile *id, int locktype){ ** sqlite3OsEnterMutex() hasn't been called yet. */ if( id->locktype>=locktype ){ - TRACE3("LOCK %d %s ok (already held)\n", id->h, locktypeName(locktype)); + TRACE3("LOCK %d %s ok (already held)\n", id->h, locktypeName(locktype)); return SQLITE_OK; } @@ -1071,7 +1071,7 @@ int sqlite3OsLock(OsFile *id, int locktype){ end_lock: sqlite3OsLeaveMutex(); - TRACE4("LOCK %d %s %s\n", id->h, locktypeName(locktype), + TRACE4("LOCK %d %s %s\n", id->h, locktypeName(locktype), rc==SQLITE_OK ? "ok" : "failed"); return rc; } @@ -1093,7 +1093,7 @@ int sqlite3OsUnlock(OsFile *id, int locktype){ int rc = SQLITE_OK; assert( id->isOpen ); - TRACE7("UNLOCK %d %d was %d(%d,%d) pid=%d\n", id->h, locktype, id->locktype, + TRACE7("UNLOCK %d %d was %d(%d,%d) pid=%d\n", id->h, locktype, id->locktype, id->pLock->locktype, id->pLock->cnt, getpid()); assert( locktype<=SHARED_LOCK ); diff --git a/src/util.c b/src/util.c index 905cdd0f24..4f19302384 100644 --- a/src/util.c +++ b/src/util.c @@ -14,7 +14,7 @@ ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** -** $Id: util.c,v 1.131 2005/03/10 12:35:46 drh Exp $ +** $Id: util.c,v 1.132 2005/03/18 14:03:15 drh Exp $ */ #include "sqliteInt.h" #include @@ -858,18 +858,6 @@ int sqlite3GetVarint32(const unsigned char *p, u32 *v){ u32 x; int n; unsigned char c; -#if 0 - if( ((c = p[0]) & 0x80)==0 ){ - *v = c; - return 1; - } - x = c & 0x7f; - if( ((c = p[1]) & 0x80)==0 ){ - *v = (x<<7) | c; - return 2; - } - x = (x<<7) | (c & 0x7f); -#else if( ((signed char*)p)[0]>=0 ){ *v = p[0]; return 1; @@ -880,7 +868,6 @@ int sqlite3GetVarint32(const unsigned char *p, u32 *v){ return 2; } x = (x<<7) | (p[1] & 0x7f); -#endif n = 2; do{ x = (x<<7) | ((c = p[n++])&0x7f);