mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Disable the "SELECT max(rowid) ..." optimization for virtual tables. Ticket #2250. (CVS 3669)
FossilOrigin-Name: ddb4d0af5770c7030fe6e92119972c9508724b9a
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle SELECT statements in SQLite.
|
||||
**
|
||||
** $Id: select.c,v 1.329 2007/02/24 13:23:53 drh Exp $
|
||||
** $Id: select.c,v 1.330 2007/03/02 07:27:00 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -2367,6 +2367,8 @@ static int simpleMinMaxQuery(Parse *pParse, Select *p, int eDest, int iParm){
|
||||
iCol = pExpr->iColumn;
|
||||
pTab = pSrc->a[0].pTab;
|
||||
|
||||
/* This optimization cannot be used with virtual tables. */
|
||||
if( IsVirtual(pTab) ) return 0;
|
||||
|
||||
/* If we get to here, it means the query is of the correct form.
|
||||
** Check to make sure we have an index and make pIdx point to the
|
||||
|
||||
Reference in New Issue
Block a user