mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Very small enhancement to dispatch speed for SQL functions.
FossilOrigin-Name: 3c3228ed16ed8a72630bd56bb9192ee3c7f82093
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Correct\sa\sharmless\stypo\sin\sthe\sprevious\scheck-in.
|
C Very\ssmall\senhancement\sto\sdispatch\sspeed\sfor\sSQL\sfunctions.
|
||||||
D 2017-02-20T23:32:04.979
|
D 2017-02-21T15:27:22.044
|
||||||
F Makefile.in edb6bcdd37748d2b1c3422ff727c748df7ffe918
|
F Makefile.in edb6bcdd37748d2b1c3422ff727c748df7ffe918
|
||||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||||
F Makefile.msc a89ea37ab5928026001569f056973b9059492fe2
|
F Makefile.msc a89ea37ab5928026001569f056973b9059492fe2
|
||||||
@@ -461,7 +461,7 @@ F src/update.c 456d4a4656f8a03c2abc88a51b19172197400e58
|
|||||||
F src/utf.c 699001c79f28e48e9bcdf8a463da029ea660540c
|
F src/utf.c 699001c79f28e48e9bcdf8a463da029ea660540c
|
||||||
F src/util.c ca8440ede81e155d15cff7c101654f60b55a9ae6
|
F src/util.c ca8440ede81e155d15cff7c101654f60b55a9ae6
|
||||||
F src/vacuum.c 1fe4555cd8c9b263afb85b5b4ee3a4a4181ad569
|
F src/vacuum.c 1fe4555cd8c9b263afb85b5b4ee3a4a4181ad569
|
||||||
F src/vdbe.c 16f378640570c24442fd7191b136b5d6380f5c7b
|
F src/vdbe.c 16542e327eb38763490473dc0e9e9396924f30b2
|
||||||
F src/vdbe.h 59998ffd71d7caa8886bc78dafaf8caeccd4c13c
|
F src/vdbe.h 59998ffd71d7caa8886bc78dafaf8caeccd4c13c
|
||||||
F src/vdbeInt.h 4e4b15b2e1330e1636e4e01974eab2b0b985092f
|
F src/vdbeInt.h 4e4b15b2e1330e1636e4e01974eab2b0b985092f
|
||||||
F src/vdbeapi.c 3e4a8893feeb78620f4aac4ac5b85d92255b97e1
|
F src/vdbeapi.c 3e4a8893feeb78620f4aac4ac5b85d92255b97e1
|
||||||
@@ -1556,7 +1556,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P 96b6a98e5e4cb0ddbfcd78b05bfbfcd8976e9f32
|
P 1589db012ef1389bf84399fccf96d143b2ac4c0f
|
||||||
R a6d884232566cde130b9b77412776230
|
R e3362d21e61dd042dd5284f17843c5d9
|
||||||
U mistachkin
|
U drh
|
||||||
Z c97450fc686b8c32bf5204625d8622fc
|
Z 12602c247389d019265df8c626a67cf1
|
||||||
|
@@ -1 +1 @@
|
|||||||
1589db012ef1389bf84399fccf96d143b2ac4c0f
|
3c3228ed16ed8a72630bd56bb9192ee3c7f82093
|
14
src/vdbe.c
14
src/vdbe.c
@@ -1669,21 +1669,21 @@ case OP_Function: {
|
|||||||
for(i=pCtx->argc-1; i>=0; i--) pCtx->argv[i] = &aMem[pOp->p2+i];
|
for(i=pCtx->argc-1; i>=0; i--) pCtx->argv[i] = &aMem[pOp->p2+i];
|
||||||
}
|
}
|
||||||
|
|
||||||
memAboutToChange(p, pCtx->pOut);
|
memAboutToChange(p, pOut);
|
||||||
#ifdef SQLITE_DEBUG
|
#ifdef SQLITE_DEBUG
|
||||||
for(i=0; i<pCtx->argc; i++){
|
for(i=0; i<pCtx->argc; i++){
|
||||||
assert( memIsValid(pCtx->argv[i]) );
|
assert( memIsValid(pCtx->argv[i]) );
|
||||||
REGISTER_TRACE(pOp->p2+i, pCtx->argv[i]);
|
REGISTER_TRACE(pOp->p2+i, pCtx->argv[i]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
MemSetTypeFlag(pCtx->pOut, MEM_Null);
|
MemSetTypeFlag(pOut, MEM_Null);
|
||||||
pCtx->fErrorOrAux = 0;
|
pCtx->fErrorOrAux = 0;
|
||||||
(*pCtx->pFunc->xSFunc)(pCtx, pCtx->argc, pCtx->argv);/* IMP: R-24505-23230 */
|
(*pCtx->pFunc->xSFunc)(pCtx, pCtx->argc, pCtx->argv);/* IMP: R-24505-23230 */
|
||||||
|
|
||||||
/* If the function returned an error, throw an exception */
|
/* If the function returned an error, throw an exception */
|
||||||
if( pCtx->fErrorOrAux ){
|
if( pCtx->fErrorOrAux ){
|
||||||
if( pCtx->isError ){
|
if( pCtx->isError ){
|
||||||
sqlite3VdbeError(p, "%s", sqlite3_value_text(pCtx->pOut));
|
sqlite3VdbeError(p, "%s", sqlite3_value_text(pOut));
|
||||||
rc = pCtx->isError;
|
rc = pCtx->isError;
|
||||||
}
|
}
|
||||||
sqlite3VdbeDeleteAuxData(db, &p->pAuxData, pCtx->iOp, pOp->p1);
|
sqlite3VdbeDeleteAuxData(db, &p->pAuxData, pCtx->iOp, pOp->p1);
|
||||||
@@ -1692,12 +1692,12 @@ case OP_Function: {
|
|||||||
|
|
||||||
/* Copy the result of the function into register P3 */
|
/* Copy the result of the function into register P3 */
|
||||||
if( pOut->flags & (MEM_Str|MEM_Blob) ){
|
if( pOut->flags & (MEM_Str|MEM_Blob) ){
|
||||||
sqlite3VdbeChangeEncoding(pCtx->pOut, encoding);
|
sqlite3VdbeChangeEncoding(pOut, encoding);
|
||||||
if( sqlite3VdbeMemTooBig(pCtx->pOut) ) goto too_big;
|
if( sqlite3VdbeMemTooBig(pOut) ) goto too_big;
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_TRACE(pOp->p3, pCtx->pOut);
|
REGISTER_TRACE(pOp->p3, pOut);
|
||||||
UPDATE_MAX_BLOBSIZE(pCtx->pOut);
|
UPDATE_MAX_BLOBSIZE(pOut);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user