mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Avoid creating a co-routine incrementally for a VALUES clause that has affinities other than NONE.
FossilOrigin-Name: 4229b12b327b05561dcf49b8585a66467d17d4e998b14eff65eb886f2434b53c
This commit is contained in:
12
src/insert.c
12
src/insert.c
@@ -593,6 +593,17 @@ static int multiValueIsConstant(ExprList *pRow){
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int multiValueIsConstantNoAff(ExprList *pRow){
|
||||
int ii;
|
||||
if( multiValueIsConstant(pRow)==0 ) return 0;
|
||||
for(ii=0; ii<pRow->nExpr; ii++){
|
||||
assert( pRow->a[ii].pExpr->affExpr==0 );
|
||||
if( 0!=sqlite3ExprAffinity(pRow->a[ii].pExpr) ) return 0;
|
||||
}
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow){
|
||||
SrcItem *p;
|
||||
SelectDest dest;
|
||||
@@ -603,6 +614,7 @@ Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow){
|
||||
|| pParse->bHasWith
|
||||
|| multiValueIsConstant(pRow)==0
|
||||
|| pLeft->pPrior
|
||||
|| (pLeft->pSrc->nSrc==0 && multiValueIsConstantNoAff(pLeft->pEList)==0)
|
||||
){
|
||||
int f = SF_Values | SF_MultiValue;
|
||||
if( pLeft->pPrior || pLeft->pSrc->nSrc ){
|
||||
|
Reference in New Issue
Block a user