1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

If a reprepare is needed after binding to a variable with a number larger

than 32, set only the high-order bit of the Vdbe.expmask rather than setting
all bits.  This could potentially result in fewer false-positive reprepares.

FossilOrigin-Name: 45797feefe90cb7da53256b0c42fdaa1221d0a27
This commit is contained in:
drh
2017-03-03 21:51:40 +00:00
parent f3f883fcd7
commit 2996796dcf
4 changed files with 11 additions and 11 deletions

View File

@@ -1260,7 +1260,7 @@ static int vdbeUnbind(Vdbe *p, int i){
** following any change to the bindings of that parameter.
*/
assert( p->isPrepareV2 || p->expmask==0 );
if( p->expmask & ((u32)1 << (i&0x001F)) && (i<32 || p->expmask==0xffffffff) ){
if( p->expmask!=0 && (p->expmask & (i>=31 ? 0x80000000 : (u32)1<<i))!=0 ){
p->expired = 1;
}
return SQLITE_OK;