aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-09-07 12:17:36 +0000
committerdrh <drh@noemail.net>2010-09-07 12:17:36 +0000
commitbb7dd68320ea290753b60a5fc909bd0fee7bd45f (patch)
treeaf84f3944d2b23fbb0ddd073888ca7c8418f274b /src
parent86ae38b525886ba8dfae25bec5890738a56c206a (diff)
downloadsqlite-bb7dd68320ea290753b60a5fc909bd0fee7bd45f.tar.gz
sqlite-bb7dd68320ea290753b60a5fc909bd0fee7bd45f.zip
Remove a redundant test for multiple output columns in a scalar subquery.
FossilOrigin-Name: 657472bce2b2fe6f3d4bbead5301f658812b937d
Diffstat (limited to 'src')
-rw-r--r--src/select.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/select.c b/src/select.c
index b0de29a83..b308e83e4 100644
--- a/src/select.c
+++ b/src/select.c
@@ -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.