mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Simplify two conditionals and add testcase() macros to the affinity transform
logic in the comparison operators. FossilOrigin-Name: 544664cadfb4e504bc0b321c865d1ecb8a831e20
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Recognize\sthe\sinvariant\sthat\sa\sMem\sobject\scannot\sbe\sMEM_Dyn\sand\shave\s\na\snon-zero\sszMalloc\sat\sthe\ssame\stime.\s\sEnforce\sthis\swith\sassert()s\sand\nexploit\sit\sin\sthe\ssqlite3VdbeMemClearAndResize()\sroutine\sfor\sa\sperformance\nincrease.
|
C Simplify\stwo\sconditionals\sand\sadd\stestcase()\smacros\sto\sthe\saffinity\stransform\nlogic\sin\sthe\scomparison\soperators.
|
||||||
D 2014-09-19T22:30:49.809
|
D 2014-09-19T22:44:20.033
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
|
F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@@ -288,7 +288,7 @@ F src/update.c 729f6f18fc27740591d085e1172cebe311144bf0
|
|||||||
F src/utf.c fc6b889ba0779b7722634cdeaa25f1930d93820c
|
F src/utf.c fc6b889ba0779b7722634cdeaa25f1930d93820c
|
||||||
F src/util.c 4006c01772bd8d8ac4306d523bbcee41d3e392d8
|
F src/util.c 4006c01772bd8d8ac4306d523bbcee41d3e392d8
|
||||||
F src/vacuum.c 59f03f92bcff57faa6a8ca256eb29ccddfb0614a
|
F src/vacuum.c 59f03f92bcff57faa6a8ca256eb29ccddfb0614a
|
||||||
F src/vdbe.c 16efd1ae26d877827cd6669f5f19afd8d8903d08
|
F src/vdbe.c de1af1795bebdad20c23e82bafa2f531e9893198
|
||||||
F src/vdbe.h 09f5b4e3719fa454f252322b1cdab5cf1f361327
|
F src/vdbe.h 09f5b4e3719fa454f252322b1cdab5cf1f361327
|
||||||
F src/vdbeInt.h f177bed1ec8d4eb5c7089f012aeb95f374745735
|
F src/vdbeInt.h f177bed1ec8d4eb5c7089f012aeb95f374745735
|
||||||
F src/vdbeapi.c e9e33b59834e3edc8790209765e069874c269d9d
|
F src/vdbeapi.c e9e33b59834e3edc8790209765e069874c269d9d
|
||||||
@@ -1198,7 +1198,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
|
|||||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||||
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
|
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
|
||||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||||
P e996ca32cb643c558b616c0dd872f3351b6aa3ef
|
P 3b21cf2b284048da4b728a5d6ec89e5c330144d4
|
||||||
R 5148a059197bc43e5fc9e398f77834ac
|
R c321e5b6443015b26d22f3eade4b771c
|
||||||
U drh
|
U drh
|
||||||
Z 24b5c2935cab55558784e01172e53731
|
Z b0d83e95571a3002a17dc014110d23f5
|
||||||
|
@@ -1 +1 @@
|
|||||||
3b21cf2b284048da4b728a5d6ec89e5c330144d4
|
544664cadfb4e504bc0b321c865d1ecb8a831e20
|
@@ -1900,17 +1900,21 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */
|
|||||||
/* Neither operand is NULL. Do a comparison. */
|
/* Neither operand is NULL. Do a comparison. */
|
||||||
affinity = pOp->p5 & SQLITE_AFF_MASK;
|
affinity = pOp->p5 & SQLITE_AFF_MASK;
|
||||||
if( affinity>=SQLITE_AFF_NUMERIC ){
|
if( affinity>=SQLITE_AFF_NUMERIC ){
|
||||||
if( (pIn1->flags & (MEM_Int|MEM_Real))==0 && (pIn1->flags&MEM_Str)!=0 ){
|
if( (pIn1->flags & (MEM_Int|MEM_Real|MEM_Str))==MEM_Str ){
|
||||||
applyNumericAffinity(pIn1,0);
|
applyNumericAffinity(pIn1,0);
|
||||||
}
|
}
|
||||||
if( (pIn3->flags & (MEM_Int|MEM_Real))==0 && (pIn3->flags&MEM_Str)!=0 ){
|
if( (pIn3->flags & (MEM_Int|MEM_Real|MEM_Str))==MEM_Str ){
|
||||||
applyNumericAffinity(pIn3,0);
|
applyNumericAffinity(pIn3,0);
|
||||||
}
|
}
|
||||||
}else if( affinity==SQLITE_AFF_TEXT ){
|
}else if( affinity==SQLITE_AFF_TEXT ){
|
||||||
if( (pIn1->flags & MEM_Str)==0 && (pIn1->flags & (MEM_Int|MEM_Real))!=0 ){
|
if( (pIn1->flags & MEM_Str)==0 && (pIn1->flags & (MEM_Int|MEM_Real))!=0 ){
|
||||||
|
testcase( pIn1->flags & MEM_Int );
|
||||||
|
testcase( pIn1->flags & MEM_Real );
|
||||||
sqlite3VdbeMemStringify(pIn1, encoding, 1);
|
sqlite3VdbeMemStringify(pIn1, encoding, 1);
|
||||||
}
|
}
|
||||||
if( (pIn3->flags & MEM_Str)==0 && (pIn3->flags & (MEM_Int|MEM_Real))!=0 ){
|
if( (pIn3->flags & MEM_Str)==0 && (pIn3->flags & (MEM_Int|MEM_Real))!=0 ){
|
||||||
|
testcase( pIn3->flags & MEM_Int );
|
||||||
|
testcase( pIn3->flags & MEM_Real );
|
||||||
sqlite3VdbeMemStringify(pIn3, encoding, 1);
|
sqlite3VdbeMemStringify(pIn3, encoding, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user