Performance tweaks for sqlite3AffinityType. (CVS 2295)
FossilOrigin-Name: 32b926154aaae9264359fa1e9a7189afd08b0bb7
This commit is contained in:
parent
52a83fbbe9
commit
59f19c15c5
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Move\ssqlite3HashNoCase\sto\shash.c.\s(CVS\s2294)
|
||||
D 2005-01-31T12:56:44
|
||||
C Performance\stweaks\sfor\ssqlite3AffinityType.\s(CVS\s2295)
|
||||
D 2005-01-31T23:45:56
|
||||
F Makefile.in ffd81f5e926d40b457071b4de8d7c1fa18f39b5a
|
||||
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
||||
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
|
||||
@ -31,7 +31,7 @@ F src/attach.c f78f76bc6a8e5e487ca53636e21ccba2484a9a61
|
||||
F src/auth.c 18c5a0befe20f3a58a41e3ddd78f372faeeefe1f
|
||||
F src/btree.c e68ae12c8b12ef9d45d58d931c36c184055a3880
|
||||
F src/btree.h 74d19cf40ab49fd69abe9e4e12a6c321ad86c497
|
||||
F src/build.c 34e6ed5c1ab484eac7efc8db317b721d73a4f72f
|
||||
F src/build.c c09954ebeef8d7464305b4b2ff53f7fe193d7ae3
|
||||
F src/cursor.c de73c00aefc4747ad59b5105cf38bbff0667922e
|
||||
F src/date.c f3d1f5cd1503dabf426a198f3ebef5afbc122a7f
|
||||
F src/delete.c 4b94395b52a8f7785acd71135c2ce54f3f5550b3
|
||||
@ -272,7 +272,7 @@ F www/tclsqlite.tcl e73f8f8e5f20e8277619433f7970060ab01088fc
|
||||
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
|
||||
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
|
||||
F www/whentouse.tcl 3e522a06ad41992023c80ca29a048ae2331ca5bd
|
||||
P dfbd684a913022ad43ce59c3422d3d94f776d547
|
||||
R 16087849b395236d6d35d58fbf728fef
|
||||
U danielk1977
|
||||
Z b57c219848738ab7b503a66722d3bbda
|
||||
P 5c10ccd8e99cab7e9f8e733dfd1447c2df1d25c1
|
||||
R 8e51075895dcc7f3464e186f35d155df
|
||||
U drh
|
||||
Z 78ca355ac379f133da207d92588fd08c
|
||||
|
@ -1 +1 @@
|
||||
5c10ccd8e99cab7e9f8e733dfd1447c2df1d25c1
|
||||
32b926154aaae9264359fa1e9a7189afd08b0bb7
|
17
src/build.c
17
src/build.c
@ -22,7 +22,7 @@
|
||||
** COMMIT
|
||||
** ROLLBACK
|
||||
**
|
||||
** $Id: build.c,v 1.303 2005/01/31 12:56:44 danielk1977 Exp $
|
||||
** $Id: build.c,v 1.304 2005/01/31 23:45:56 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@ -876,14 +876,13 @@ static char sqlite3AffinityType(const char *zType, int nType){
|
||||
return SQLITE_AFF_NONE;
|
||||
}
|
||||
for(i=0; i<sizeof(substrings)/sizeof(substrings[0]); i++){
|
||||
int c1 = substrings[i].zSub[0];
|
||||
int c2 = tolower(c1);
|
||||
int limit = nType - substrings[i].nSub;
|
||||
const char *z = substrings[i].zSub;
|
||||
for(n=0; n<=limit; n++){
|
||||
int c = zType[n];
|
||||
if( (c==c1 || c==c2)
|
||||
&& 0==sqlite3StrNICmp(&zType[n], z, substrings[i].nSub) ){
|
||||
const char *zSub = substrings[i].zSub;
|
||||
int c1 = tolower(zSub[0]);
|
||||
int len = substrings[i].nSub;
|
||||
int limit = nType - len;
|
||||
const char *z = zType;
|
||||
for(n=0; n<=limit; n++, z++){
|
||||
if( tolower(z[0])==c1 && 0==sqlite3StrNICmp(z, zSub, len) ){
|
||||
return substrings[i].affinity;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user