1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Additional refinements to Expr handling. Restore compression of trigger

expressions.  Change Expr.zToken to Expr.u.zToken and added Expr.u.iValue.
Remove an unnecessary ExprDup from CHECK constraint processing.  And so forth. (CVS 6682)

FossilOrigin-Name: 4ac2bdfbb4230b6ceaae87e738fa61036bbe03cb
This commit is contained in:
drh
2009-05-28 01:00:55 +00:00
parent b7916a78ff
commit 33e619fc1c
23 changed files with 296 additions and 197 deletions

View File

@@ -22,7 +22,7 @@
** COMMIT
** ROLLBACK
**
** $Id: build.c,v 1.545 2009/05/27 10:31:29 drh Exp $
** $Id: build.c,v 1.546 2009/05/28 01:00:55 drh Exp $
*/
#include "sqliteInt.h"
@@ -1181,14 +1181,12 @@ void sqlite3AddCheckConstraint(
#ifndef SQLITE_OMIT_CHECK
Table *pTab = pParse->pNewTable;
if( pTab && !IN_DECLARE_VTAB ){
/* The CHECK expression must be duplicated so that tokens refer
** to malloced space and not the (ephemeral) text of the CREATE TABLE
** statement */
pTab->pCheck = sqlite3ExprAnd(db, pTab->pCheck,
sqlite3ExprDup(db, pCheckExpr, 0));
}
pTab->pCheck = sqlite3ExprAnd(db, pTab->pCheck, pCheckExpr);
}else
#endif
sqlite3ExprDelete(db, pCheckExpr);
{
sqlite3ExprDelete(db, pCheckExpr);
}
}
/*