aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-08-24 15:39:42 +0000
committerdrh <drh@noemail.net>2015-08-24 15:39:42 +0000
commitbc622bc045a919b491be2d1ba0c56fd5fd7ff22f (patch)
tree10b75608eb02240f45844d85bdb23ece7e3bae2d /src/expr.c
parent80d874083b38c5e24d854a76ab07b791fb0dc2cb (diff)
downloadsqlite-bc622bc045a919b491be2d1ba0c56fd5fd7ff22f.tar.gz
sqlite-bc622bc045a919b491be2d1ba0c56fd5fd7ff22f.zip
Disallow the use of COLLATE clauses and the ASC and DESC keywords within
foreign key constraints and in the argument list to common table expressions. FossilOrigin-Name: 83cbc4d8761498647794affffa961a4fca311be7
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c
index 04cd36ea7..1c57ecc6f 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1161,6 +1161,21 @@ no_mem:
}
/*
+** Set the sort order for the last element on the given ExprList.
+*/
+void sqlite3ExprListSetSortOrder(ExprList *p, int iSortOrder){
+ if( p==0 ) return;
+ assert( SQLITE_SO_UNDEFINED<0 && SQLITE_SO_ASC>=0 && SQLITE_SO_DESC>0 );
+ assert( p->nExpr>0 );
+ if( iSortOrder<0 ){
+ assert( p->a[p->nExpr-1].sortOrder==SQLITE_SO_ASC );
+ return;
+ }
+ p->a[p->nExpr-1].sortOrder = (u8)iSortOrder;
+ p->a[p->nExpr-1].bDefinedSO = 1;
+}
+
+/*
** Set the ExprList.a[].zName element of the most recently added item
** on the expression list.
**