1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Fix bug with CHECK constraints contain an IN operator. Ticket #1645. (CVS 3035)

FossilOrigin-Name: 944df310ce8d32798135c70becee7845676520ae
This commit is contained in:
drh
2006-01-30 14:36:59 +00:00
parent 4d5238f0c0
commit afa5f68091
4 changed files with 32 additions and 11 deletions

View File

@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.252 2006/01/24 12:09:19 danielk1977 Exp $
** $Id: expr.c,v 1.253 2006/01/30 14:36:59 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1699,6 +1699,7 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
case TK_IN: {
int addr;
char affinity;
int ckOffset = pParse->ckOffset;
sqlite3CodeSubselect(pParse, pExpr);
/* Figure out the affinity to use to create a key from the results
@@ -1708,6 +1709,7 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
affinity = comparisonAffinity(pExpr);
sqlite3VdbeAddOp(v, OP_Integer, 1, 0);
pParse->ckOffset = ckOffset+1;
/* Code the <expr> from "<expr> IN (...)". The temporary table
** pExpr->iTable contains the values that make up the (...) set.