Small performance improvement in the OP_MakeRecord opcode.
FossilOrigin-Name: ca89daef0fcf6cb04aa6fa90dd333d6f2474bf3f458c833d9cd5bd8e59f2a04a
This commit is contained in:
parent
06af03d70a
commit
7ba63831f8
13
manifest
13
manifest
@ -1,5 +1,5 @@
|
||||
C Change\sto\s[44135d6ea84f7ba6]\sthat\sretains\sthe\shistorical\sdatatype\s("INT",\snot\s"NUM")\sfor\sa\stable\screated\sas\sfollows:\s"CREATE\sTABLE\st1\sAS\sSELECT\sCAST(123\sAS\sINT)\sAS\svalue;".\s\sThe\suse\sof\sFLEXNUM\sonly\soccurs\son\scompound\squeries.
|
||||
D 2023-03-08T14:28:09.479
|
||||
C Small\sperformance\simprovement\sin\sthe\sOP_MakeRecord\sopcode.
|
||||
D 2023-03-08T17:09:32.272
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -694,7 +694,7 @@ F src/upsert.c 5303dc6c518fa7d4b280ec65170f465c7a70b7ac2b22491598f6d0b4875b3145
|
||||
F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0
|
||||
F src/util.c 3ff7bc2b48dd425b1448304bb86273b05da1621f136d51dbb9789f8803559a1f
|
||||
F src/vacuum.c 84ce7f01f8a7a08748e107a441db83bcec13970190ddcb0c9ff522adbc1c23fd
|
||||
F src/vdbe.c 0cf4c72a9e0eb614afc19c9c4ca9c8a919c97c0866934a70dac7c2f689a4edf8
|
||||
F src/vdbe.c 80a64921734e74b1b28b321225137ec555b0e15d73f3322c2c0651a8be481114
|
||||
F src/vdbe.h 73b904a6b3bb27f308c6cc287a5751ebc7f1f89456be0ed068a12b92844c6e8c
|
||||
F src/vdbeInt.h a4147a4ddf613cb1bcb555ace9e9e74a9c099d65facd88155f191b1fb4d74cfb
|
||||
F src/vdbeapi.c 40c47b1528d308a322203de21d2e0d711753257ed9771771b6129214b1d65932
|
||||
@ -2049,9 +2049,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P dd8612c8adbaf9d06bf0d7319b9afc9bd8ca3d0fcfa1cb591a7a2fcb86480048 a0e54fe2058a4ac1e794b2491e424c60dfa42c6781b1cfd83c5db65c28c11c71
|
||||
R 9ae8ce857b1bda3c57c6b1a52ab41ca6
|
||||
T +closed a0e54fe2058a4ac1e794b2491e424c60dfa42c6781b1cfd83c5db65c28c11c71
|
||||
P 6d5b5896261c62a7e130b47416ee8c25793859a2afcb1646c257600537a5b71b
|
||||
R 1b5d34199b6078f6cf9502fa50e8d5f3
|
||||
U drh
|
||||
Z 7b6226a524a3a9d94d5cfc19b85e131d
|
||||
Z 1c424b0c5c8b9aa32605259b67546e86
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
6d5b5896261c62a7e130b47416ee8c25793859a2afcb1646c257600537a5b71b
|
||||
ca89daef0fcf6cb04aa6fa90dd333d6f2474bf3f458c833d9cd5bd8e59f2a04a
|
34
src/vdbe.c
34
src/vdbe.c
@ -3379,23 +3379,7 @@ case OP_MakeRecord: {
|
||||
pRec = pLast;
|
||||
do{
|
||||
assert( memIsValid(pRec) );
|
||||
if( pRec->flags & MEM_Null ){
|
||||
if( pRec->flags & MEM_Zero ){
|
||||
/* Values with MEM_Null and MEM_Zero are created by xColumn virtual
|
||||
** table methods that never invoke sqlite3_result_xxxxx() while
|
||||
** computing an unchanging column value in an UPDATE statement.
|
||||
** Give such values a special internal-use-only serial-type of 10
|
||||
** so that they can be passed through to xUpdate and have
|
||||
** a true sqlite3_value_nochange(). */
|
||||
#ifndef SQLITE_ENABLE_NULL_TRIM
|
||||
assert( pOp->p5==OPFLAG_NOCHNG_MAGIC || CORRUPT_DB );
|
||||
#endif
|
||||
pRec->uTemp = 10;
|
||||
}else{
|
||||
pRec->uTemp = 0;
|
||||
}
|
||||
nHdr++;
|
||||
}else if( pRec->flags & (MEM_Int|MEM_IntReal) ){
|
||||
if( pRec->flags & (MEM_Int|MEM_IntReal) ){
|
||||
/* Figure out whether to use 1, 2, 4, 6 or 8 bytes. */
|
||||
i64 i = pRec->u.i;
|
||||
u64 uu;
|
||||
@ -3445,6 +3429,22 @@ case OP_MakeRecord: {
|
||||
pRec->uTemp = 6;
|
||||
}
|
||||
}
|
||||
}else if( pRec->flags & MEM_Null ){
|
||||
if( pRec->flags & MEM_Zero ){
|
||||
/* Values with MEM_Null and MEM_Zero are created by xColumn virtual
|
||||
** table methods that never invoke sqlite3_result_xxxxx() while
|
||||
** computing an unchanging column value in an UPDATE statement.
|
||||
** Give such values a special internal-use-only serial-type of 10
|
||||
** so that they can be passed through to xUpdate and have
|
||||
** a true sqlite3_value_nochange(). */
|
||||
#ifndef SQLITE_ENABLE_NULL_TRIM
|
||||
assert( pOp->p5==OPFLAG_NOCHNG_MAGIC || CORRUPT_DB );
|
||||
#endif
|
||||
pRec->uTemp = 10;
|
||||
}else{
|
||||
pRec->uTemp = 0;
|
||||
}
|
||||
nHdr++;
|
||||
}else if( pRec->flags & MEM_Real ){
|
||||
nHdr++;
|
||||
nData += 8;
|
||||
|
Loading…
Reference in New Issue
Block a user