]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add some #if SQLITE_VERSION_NUMBER macros to test/speedtest1.c in order to
authordrh <drh@noemail.net>
Sun, 1 Dec 2013 18:10:01 +0000 (18:10 +0000)
committerdrh <drh@noemail.net>
Sun, 1 Dec 2013 18:10:01 +0000 (18:10 +0000)
make it compatible with older versions of SQLite so that it can be used for
historical speed comparisons.

FossilOrigin-Name: a9e1627ae714156cf6bd419e41cf9b79fbbe99a9

manifest
manifest.uuid
test/speedtest1.c

index 7b389a549975afce91018b213bcc87f34947714e..4bc50bd00e522871037d72617a8f021074ccd36d 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\stypos\sin\sthe\sheader\scomment\son\sthe\ssqlite3Atoi64()\sroutine.
-D 2013-12-01T01:18:29.458
+C Add\ssome\s#if\sSQLITE_VERSION_NUMBER\smacros\sto\stest/speedtest1.c\sin\sorder\sto\nmake\sit\scompatible\swith\solder\sversions\sof\sSQLite\sso\sthat\sit\scan\sbe\sused\sfor\nhistorical\sspeed\scomparisons.
+D 2013-12-01T18:10:01.701
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in e1a9b4258bbde53f5636f4e238c65b7e11459e2b
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -820,7 +820,7 @@ F test/speed3.test d32043614c08c53eafdc80f33191d5bd9b920523
 F test/speed4.test abc0ad3399dcf9703abed2fff8705e4f8e416715
 F test/speed4p.explain 6b5f104ebeb34a038b2f714150f51d01143e59aa
 F test/speed4p.test 0e51908951677de5a969b723e03a27a1c45db38b
-F test/speedtest1.c 184ded13ffe61df44d6e2ac9985b61a6417d5311
+F test/speedtest1.c aa1ff125bc9c4b8eb55db2e3cbb82ba76794dedf
 F test/spellfix.test 8c40b169b104086d8795781f670ba3c786d6d8be
 F test/sqllimits1.test b1aae27cc98eceb845e7f7adf918561256e31298
 F test/stat.test c8eccfe8fcd3f3cfc864ce22d5b9e803a3c69940
@@ -1145,7 +1145,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P 55ec474db8935ef36fae30da5d11f5701c60c088
-R d4e526e47db9fa86e2dd72e39606971c
+P c85e0c546ea6c6be46deea5c7a716b5fb553c7b4
+R 3cfbbdfa905179d97133dd917fc5f770
 U drh
-Z 5cc45f2d22e4b0c01c22c0dac659e6ce
+Z aec8d6f2ae39d50473657768f7788a16
index 2023f47b7b2ae690ee3575ed9f2a4f2dd9aff89f..e66ea9881c0278960f41c071e2f9f2842d5d4d2c 100644 (file)
@@ -1 +1 @@
-c85e0c546ea6c6be46deea5c7a716b5fb553c7b4
\ No newline at end of file
+a9e1627ae714156cf6bd419e41cf9b79fbbe99a9
\ No newline at end of file
index ea9ec2e3518246a7f546d789fc8d6c06ec8a728c..473b3d191e54583172f29cdb4eb1d8e1d758d98d 100644 (file)
@@ -79,6 +79,12 @@ static int hexDigitValue(char c){
   return -1;
 }
 
+/* Provide an alternative to sqlite3_stricmp() in older versions of
+** SQLite */
+#if SQLITE_VERSION_NUMBER<3007011
+# define sqlite3_stricmp strcmp
+#endif
+
 /*
 ** Interpret zArg as an integer value, possibly with suffixes.
 */
@@ -131,7 +137,7 @@ sqlite3_int64 speedtest1_timestamp(void){
   static sqlite3_vfs *clockVfs = 0;
   sqlite3_int64 t;
   if( clockVfs==0 ) clockVfs = sqlite3_vfs_find(0);
-  if( clockVfs->iVersion>=1 && clockVfs->xCurrentTimeInt64!=0 ){
+  if( clockVfs->iVersion>=2 && clockVfs->xCurrentTimeInt64!=0 ){
     clockVfs->xCurrentTimeInt64(clockVfs, &t);
   }else{
     double r;
@@ -898,6 +904,7 @@ int main(int argc, char **argv){
 
   /* Database connection statistics printed after both prepared statements
   ** have been finalized */
+#if SQLITE_VERSION_NUMBER>=3007009
   if( showStats ){
     sqlite3_db_status(g.db, SQLITE_DBSTATUS_LOOKASIDE_USED, &iCur, &iHi, 0);
     printf("-- Lookaside Slots Used:        %d (max %d)\n", iCur,iHi);
@@ -920,6 +927,7 @@ int main(int argc, char **argv){
     sqlite3_db_status(g.db, SQLITE_DBSTATUS_STMT_USED, &iCur, &iHi, 0);
     printf("-- Statement Heap Usage:        %d bytes\n", iCur); 
   }
+#endif
 
   sqlite3_close(g.db);