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

@ -1,8 +1,8 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
C In\sthe\stest\sscripts,\schanges\sinstances\sof\sthe\sTCL\sinterface\s\noption\s"-has_codec"\sinto\sthe\scorrect\s"-has-codec".
D 2010-09-06T20:28:29
C Remove\sa\sredundant\stest\sfor\smultiple\soutput\scolumns\sin\sa\sscalar\ssubquery.
D 2010-09-07T12:17:37
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in c599a15d268b1db2aeadea19df2adc3bf2eb6bee
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -174,7 +174,7 @@ F src/printf.c 8ae5082dd38a1b5456030c3755ec3a392cd51506
F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50
F src/resolve.c 1c0f32b64f8e3f555fe1f732f9d6f501a7f05706
F src/rowset.c 69afa95a97c524ba6faf3805e717b5b7ae85a697
F src/select.c eb57331a0f37fbfff0b24824555ac70dbc996c4d
F src/select.c b0b124781474e4e0c8f64022875e5e2009e13443
F src/shell.c 8517fc1f9c59ae4007e6cc8b9af91ab231ea2056
F src/sqlite.h.in d867122e53a24b9a11864a7aaf2509cad62c55b2
F src/sqlite3ext.h 69dfb8116af51b84a029cddb3b35062354270c89
@ -859,14 +859,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P 9db26d5ef5a4c6f9fe0adf2ff306f6f07b6cc60c
R e10932862ba72a33ff6a8f87f9116f0d
P f53856a555403678ea8bd721a9fa1ae179240406
R 5f2765c708f251a452f50c3d681e788f
U drh
Z 024219aeef705f0a0432a5942a4c1267
Z 2f1f180595f4171d1fd41af819ae0bb1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFMhU7woxKgR168RlERAgD3AJwLUlw4+NeqWzbperlczwJDR543RgCfW9rR
AqJ2Ft2qX3hILCNxsekQRaI=
=prxb
iD8DBQFMhi1koxKgR168RlERAo0UAJ0bXJ4jkQV6DdQmQmuXpoa9+qmdGQCfe8/V
jrQMWt/y0xnikkzOL7gNcfY=
=QJ3m
-----END PGP SIGNATURE-----

View File

@ -1 +1 @@
f53856a555403678ea8bd721a9fa1ae179240406
657472bce2b2fe6f3d4bbead5301f658812b937d

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.