mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Disallow ORDER BY and LIMIT on UPDATE and DELETE of views and WITHOUT ROWID
tables. This is a temporary fix for ticket [d4beea1633f1b88f] until a better solution can be found. FossilOrigin-Name: 62fe56b59270d9d7372b1bb8a53788a40d20d0f111fe38c61dd6269848592c70
This commit is contained in:
@@ -596,7 +596,11 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
|
||||
SrcList *pSrcList = pNC->pSrcList;
|
||||
struct SrcList_item *pItem;
|
||||
assert( pSrcList && pSrcList->nSrc==1 );
|
||||
pItem = pSrcList->a;
|
||||
pItem = pSrcList->a;
|
||||
if( !HasRowid(pItem->pTab) || pItem->pTab->pSelect!=0 ){
|
||||
sqlite3ErrorMsg(pParse, "ORDER BY and LIMIT not support for table %s",
|
||||
pItem->pTab->zName);
|
||||
}
|
||||
pExpr->op = TK_COLUMN;
|
||||
pExpr->pTab = pItem->pTab;
|
||||
pExpr->iTable = pItem->iCursor;
|
||||
|
||||
Reference in New Issue
Block a user