mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Honor the full_column_names pragma on * results. Ticket #1263. (CVS 2493)
FossilOrigin-Name: 0d57f851ae4f483985710db149c8f541e45cdb86
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Do\snot\sallow\sparameters\sin\sVIEW\sdefinitions.\s\sTicket\s#1270.\s(CVS\s2492)
|
C Honor\sthe\sfull_column_names\spragma\son\s*\sresults.\s\sTicket\s#1263.\s(CVS\s2493)
|
||||||
D 2005-06-06T15:32:08
|
D 2005-06-06T16:34:33
|
||||||
F Makefile.in 8129e7f261d405db783676f9ca31e0841768c652
|
F Makefile.in 8129e7f261d405db783676f9ca31e0841768c652
|
||||||
F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
|
F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
|
||||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||||
@@ -60,7 +60,7 @@ F src/pragma.c 0ed94a1aa982802a9cf2a932c48d99b60683fa53
|
|||||||
F src/prepare.c d53602d2f8e097225ae7c76ec764ae68f759ba47
|
F src/prepare.c d53602d2f8e097225ae7c76ec764ae68f759ba47
|
||||||
F src/printf.c 3d20b21cfecadacecac3fb7274e746cb81d3d357
|
F src/printf.c 3d20b21cfecadacecac3fb7274e746cb81d3d357
|
||||||
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
||||||
F src/select.c 071a484044efb74fb5d8f79560822cbfc7c906c3
|
F src/select.c a057b1bb71ca2db3939e35994e16b718a83c93bf
|
||||||
F src/shell.c 25b3217d7c64e6497225439d261a253a23efff26
|
F src/shell.c 25b3217d7c64e6497225439d261a253a23efff26
|
||||||
F src/sqlite.h.in f28f5b018f03a66aaf0bc1ab6985d8605d6b964f
|
F src/sqlite.h.in f28f5b018f03a66aaf0bc1ab6985d8605d6b964f
|
||||||
F src/sqliteInt.h 0aa1d1bd6f34db3955d8615b18b20426cfd15acc
|
F src/sqliteInt.h 0aa1d1bd6f34db3955d8615b18b20426cfd15acc
|
||||||
@@ -281,7 +281,7 @@ F www/tclsqlite.tcl 425be741b8ae664f55cb1ef2371aab0a75109cf9
|
|||||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||||
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
||||||
F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b
|
F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b
|
||||||
P c1691004d6d81b683a4ca5b1723c0de8b9b4e376
|
P 0d46289f02aad526f462a3ceceb1bca1b9f6a543
|
||||||
R 160f72ab1cdfc77fb0f6e3997ccf35b8
|
R 29792a52460a836b0b452524b5145772
|
||||||
U drh
|
U drh
|
||||||
Z 3ef2bc1a475fc394b6aaef446b604547
|
Z 4bc021ee60e3eeed253efe0298ce7ec7
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
0d46289f02aad526f462a3ceceb1bca1b9f6a543
|
0d57f851ae4f483985710db149c8f541e45cdb86
|
||||||
14
src/select.c
14
src/select.c
@@ -12,7 +12,7 @@
|
|||||||
** This file contains C code routines that are called by the parser
|
** This file contains C code routines that are called by the parser
|
||||||
** to handle SELECT statements in SQLite.
|
** to handle SELECT statements in SQLite.
|
||||||
**
|
**
|
||||||
** $Id: select.c,v 1.248 2005/05/26 14:41:47 danielk1977 Exp $
|
** $Id: select.c,v 1.249 2005/06/06 16:34:33 drh Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
|
|
||||||
@@ -1070,6 +1070,10 @@ static int prepSelectStmt(Parse *pParse, Select *p){
|
|||||||
*/
|
*/
|
||||||
struct ExprList_item *a = pEList->a;
|
struct ExprList_item *a = pEList->a;
|
||||||
ExprList *pNew = 0;
|
ExprList *pNew = 0;
|
||||||
|
int flags = pParse->db->flags;
|
||||||
|
int longNames = (flags & SQLITE_FullColNames)!=0 &&
|
||||||
|
(flags & SQLITE_ShortColNames)==0;
|
||||||
|
|
||||||
for(k=0; k<pEList->nExpr; k++){
|
for(k=0; k<pEList->nExpr; k++){
|
||||||
Expr *pE = a[k].pExpr;
|
Expr *pE = a[k].pExpr;
|
||||||
if( pE->op!=TK_ALL &&
|
if( pE->op!=TK_ALL &&
|
||||||
@@ -1122,7 +1126,7 @@ static int prepSelectStmt(Parse *pParse, Select *p){
|
|||||||
pRight = sqlite3Expr(TK_ID, 0, 0, 0);
|
pRight = sqlite3Expr(TK_ID, 0, 0, 0);
|
||||||
if( pRight==0 ) break;
|
if( pRight==0 ) break;
|
||||||
setToken(&pRight->token, zName);
|
setToken(&pRight->token, zName);
|
||||||
if( zTabName && pTabList->nSrc>1 ){
|
if( zTabName && (longNames || pTabList->nSrc>1) ){
|
||||||
pLeft = sqlite3Expr(TK_ID, 0, 0, 0);
|
pLeft = sqlite3Expr(TK_ID, 0, 0, 0);
|
||||||
pExpr = sqlite3Expr(TK_DOT, pLeft, pRight, 0);
|
pExpr = sqlite3Expr(TK_DOT, pLeft, pRight, 0);
|
||||||
if( pExpr==0 ) break;
|
if( pExpr==0 ) break;
|
||||||
@@ -1136,7 +1140,11 @@ static int prepSelectStmt(Parse *pParse, Select *p){
|
|||||||
pExpr = pRight;
|
pExpr = pRight;
|
||||||
pExpr->span = pExpr->token;
|
pExpr->span = pExpr->token;
|
||||||
}
|
}
|
||||||
pNew = sqlite3ExprListAppend(pNew, pExpr, &pRight->token);
|
if( longNames ){
|
||||||
|
pNew = sqlite3ExprListAppend(pNew, pExpr, &pExpr->span);
|
||||||
|
}else{
|
||||||
|
pNew = sqlite3ExprListAppend(pNew, pExpr, &pRight->token);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( !tableSeen ){
|
if( !tableSeen ){
|
||||||
|
|||||||
Reference in New Issue
Block a user