mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Make sure the target register is allocated before adding the bogus
OP_Variable opcode in isLikeOrGlob(). Bugfix for the new sqlite3_reoptimize() logic. FossilOrigin-Name: e74f8dc436213b7ef754adcab5ef7554d774474c
This commit is contained in:
@@ -695,9 +695,12 @@ static int isLikeOrGlob(
|
||||
** value of the variable means there is no need to invoke the LIKE
|
||||
** function, then no OP_Variable will be added to the program.
|
||||
** This causes problems for the sqlite3_bind_parameter_name()
|
||||
** API. To workaround them, add a dummy OP_Variable here. */
|
||||
sqlite3ExprCodeTarget(pParse, pRight, 1);
|
||||
** API. To workaround them, add a dummy OP_Variable here.
|
||||
*/
|
||||
int r1 = sqlite3GetTempReg(pParse);
|
||||
sqlite3ExprCodeTarget(pParse, pRight, r1);
|
||||
sqlite3VdbeChangeP3(v, sqlite3VdbeCurrentAddr(v)-1, 0);
|
||||
sqlite3ReleaseTempReg(pParse, r1);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user