1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Remove a redundant test for multiple output columns in a scalar subquery.

FossilOrigin-Name: 657472bce2b2fe6f3d4bbead5301f658812b937d
This commit is contained in:
drh
2010-09-07 12:17:36 +00:00
parent 86ae38b525
commit bb7dd68320
3 changed files with 15 additions and 16 deletions

View File

@@ -491,11 +491,13 @@ static void codeDistinct(
sqlite3ReleaseTempReg(pParse, r1);
}
#ifndef SQLITE_OMIT_SUBQUERY
/*
** Generate an error message when a SELECT is used within a subexpression
** (example: "a IN (SELECT * FROM table)") but it has more than 1 result
** column. We do this in a subroutine because the error occurs in multiple
** places.
** column. We do this in a subroutine because the error used to occur
** in multiple places. (The error only occurs in one place now, but we
** retain the subroutine to minimize code disruption.)
*/
static int checkForMultiColumnSelectError(
Parse *pParse, /* Parse context. */
@@ -511,6 +513,7 @@ static int checkForMultiColumnSelectError(
return 0;
}
}
#endif
/*
** This routine generates the code for the inside of the inner loop
@@ -590,10 +593,6 @@ static void selectInnerLoop(
}
}
if( checkForMultiColumnSelectError(pParse, pDest, pEList->nExpr) ){
return;
}
switch( eDest ){
/* In this mode, write each query result to the key of the temporary
** table iParm.