1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

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
This commit is contained in:
drh
2015-08-24 15:39:42 +00:00
parent 80d874083b
commit bc622bc045
7 changed files with 126 additions and 17 deletions

View File

@@ -1160,6 +1160,21 @@ no_mem:
return 0;
}
/*
** 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.