From: drh Date: Thu, 19 Nov 2015 13:21:31 +0000 (+0000) Subject: Fix a 10-year-old misguided attempt at parser performance improvement that X-Git-Tag: version-3.10.0~122 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a6f88ffd3ae12f8b6b38b8ece8d9ffe5608a87a0;p=thirdparty%2Fsqlite.git Fix a 10-year-old misguided attempt at parser performance improvement that actually made parsing slightly slower. FossilOrigin-Name: 3833cbac0706ecac9a641d70b786d26f7e1a42b1 --- diff --git a/manifest b/manifest index 3977bc21ce..7b6fa36f04 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C When\susing\smmap\smode\son\sWin32,\suse\sa\sread-only\smapping\sby\sdefault.\sWrite\sto\sthe\sdatabase\sfile\susing\sWriteFile().\sUnless\sSQLITE_MMAP_READWRITE\sis\sdefined,\sin\swhich\scase\suse\sa\sread/write\smapping\sand\swrite\sinto\sthe\sfile\susing\smemcpy(). -D 2015-11-17T21:42:32.347 +C Fix\sa\s10-year-old\smisguided\sattempt\sat\sparser\sperformance\simprovement\sthat\nactually\smade\sparsing\sslightly\sslower. +D 2015-11-19T13:21:31.911 F Makefile.in d828db6afa6c1fa060d01e33e4674408df1942a1 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc e928e68168df69b353300ac87c10105206653a03 @@ -285,7 +285,7 @@ F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79 F src/btree.c d3bdd8462a86492e2ebc9aca4a0168429017de25 F src/btree.h 2d76dee44704c47eed323356a758662724b674a0 F src/btreeInt.h 3ab435ed27adea54d040584b0bcc488ee7db1e38 -F src/build.c ca574d33ffb1763cfd2979383f4d507095bfbe19 +F src/build.c baee971344208e212573c08f6bd5579023cc5d14 F src/callback.c 7b44ce59674338ad48b0e84e7b72f935ea4f68b0 F src/complete.c addcd8160b081131005d5bc2d34adf20c1c5c92f F src/ctime.c 509ef9c64d1321f42448f111da86400b1799218a @@ -1403,7 +1403,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 67c5d3c646c8198c8637069140aca952b802df25 -R d582abf646ba97a05dcf7955b3e63a88 -U mistachkin -Z 3d22a16f35aefddddac7e9c38e41c6d4 +P 4f521b5bb36a1117db324e92dcf80abd2f1a5bc1 +R cfcad521008e112c6b761003fe8dc627 +U drh +Z 7e2a0f5e909f9722ed5527dda015ff6e diff --git a/manifest.uuid b/manifest.uuid index f18cecb173..25fa29f661 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -4f521b5bb36a1117db324e92dcf80abd2f1a5bc1 \ No newline at end of file +3833cbac0706ecac9a641d70b786d26f7e1a42b1 \ No newline at end of file diff --git a/src/build.c b/src/build.c index 8cb2d44ac7..a46bb58520 100644 --- a/src/build.c +++ b/src/build.c @@ -1049,19 +1049,6 @@ begin_table_error: return; } -/* -** This macro is used to compare two strings in a case-insensitive manner. -** It is slightly faster than calling sqlite3StrICmp() directly, but -** produces larger code. -** -** WARNING: This macro is not compatible with the strcmp() family. It -** returns true if the two strings are equal, otherwise false. -*/ -#define STRICMP(x, y) (\ -sqlite3UpperToLower[*(unsigned char *)(x)]== \ -sqlite3UpperToLower[*(unsigned char *)(y)] \ -&& sqlite3StrICmp((x)+1,(y)+1)==0 ) - /* ** Add a new column to the table currently being constructed. ** @@ -1086,7 +1073,7 @@ void sqlite3AddColumn(Parse *pParse, Token *pName){ z = sqlite3NameFromToken(db, pName); if( z==0 ) return; for(i=0; inCol; i++){ - if( STRICMP(z, p->aCol[i].zName) ){ + if( sqlite3_stricmp(z, p->aCol[i].zName)==0 ){ sqlite3ErrorMsg(pParse, "duplicate column name: %s", z); sqlite3DbFree(db, z); return;