1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-24 09:53:10 +03:00

Speed improvement on the LIKE command. (CVS 2110)

FossilOrigin-Name: 85d56beb7494ce63e70ab1ffc3797c2ee4c36749
This commit is contained in:
drh
2004-11-18 13:49:25 +00:00
parent e854c5607b
commit 20fc0887f5
3 changed files with 10 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
C Fix\san\sobsolete\scomment\sthat\sresulted\sin\sincorrect\sdocumentation.\nTicket\s#1003.\s(CVS\s2109) C Speed\simprovement\son\sthe\sLIKE\scommand.\s(CVS\s2110)
D 2004-11-18T02:10:55 D 2004-11-18T13:49:26
F Makefile.in e747bb5ba34ccbdd81f79dcf1b2b33c02817c21d F Makefile.in e747bb5ba34ccbdd81f79dcf1b2b33c02817c21d
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457 F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1 F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
@@ -35,7 +35,7 @@ F src/build.c a95eb1181247368b0ffe2eed121a43735976a964
F src/date.c 65536e7ea04fdde6e0551264fca15966966e171f F src/date.c 65536e7ea04fdde6e0551264fca15966966e171f
F src/delete.c be9d039b819f4a5d0fdfaeceace139ba189ef819 F src/delete.c be9d039b819f4a5d0fdfaeceace139ba189ef819
F src/expr.c 4ee3e47358c92a919062255b14057a7a8f641e01 F src/expr.c 4ee3e47358c92a919062255b14057a7a8f641e01
F src/func.c 897c1c130af08b29cdd89dd89f8c1832bab766b4 F src/func.c 1a5e23e206ecb81b73e4b97ef1a9654775b53f1e
F src/hash.c a97721a55440b7bea31ffe471bb2f6b4123cddd5 F src/hash.c a97721a55440b7bea31ffe471bb2f6b4123cddd5
F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84 F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84
F src/insert.c 9524a6c3e86cbdbae3313f6a083bb9a3e7a2462b F src/insert.c 9524a6c3e86cbdbae3313f6a083bb9a3e7a2462b
@@ -259,7 +259,7 @@ F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618 F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
F www/whentouse.tcl fdacb0ba2d39831e8a6240d05a490026ad4c4e4c F www/whentouse.tcl fdacb0ba2d39831e8a6240d05a490026ad4c4e4c
P ae45ad863b0854b96da31321c500e3168ef103ad P c93a9e18d2bf53690f577a901e0defd8a449d56a
R 058dba7580f8046da9393524c9e0b47a R 41f63229808e62aecab58ec2f7d5cad7
U drh U drh
Z c7a24402458bd079da88801ec8f8c5f3 Z 1e586546872d49a1225e64744cd9ac4a

View File

@@ -1 +1 @@
c93a9e18d2bf53690f577a901e0defd8a449d56a 85d56beb7494ce63e70ab1ffc3797c2ee4c36749

View File

@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file. ** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope. ** All other code has file scope.
** **
** $Id: func.c,v 1.88 2004/11/17 16:41:30 danielk1977 Exp $ ** $Id: func.c,v 1.89 2004/11/18 13:49:26 drh Exp $
*/ */
#include <ctype.h> #include <ctype.h>
#include <math.h> #include <math.h>
@@ -372,7 +372,7 @@ static int patternCompare(
} }
zPattern++; zPattern++;
} }
if( c && sqlite3ReadUtf8(&zPattern[1])==esc ){ if( c && esc && sqlite3ReadUtf8(&zPattern[1])==esc ){
u8 const *zTemp = &zPattern[1]; u8 const *zTemp = &zPattern[1];
sqliteNextChar(zTemp); sqliteNextChar(zTemp);
c = *zTemp; c = *zTemp;
@@ -433,7 +433,7 @@ static int patternCompare(
if( c2==0 || (seen ^ invert)==0 ) return 0; if( c2==0 || (seen ^ invert)==0 ) return 0;
sqliteNextChar(zString); sqliteNextChar(zString);
zPattern++; zPattern++;
}else if( !prevEscape && sqlite3ReadUtf8(zPattern)==esc){ }else if( esc && !prevEscape && sqlite3ReadUtf8(zPattern)==esc){
prevEscape = 1; prevEscape = 1;
sqliteNextChar(zPattern); sqliteNextChar(zPattern);
}else{ }else{