aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2015-12-02 18:59:44 +0000
committerdan <dan@noemail.net>2015-12-02 18:59:44 +0000
commit9a8941fc83f87b45e5c149b936bebc8bb254acde (patch)
tree3772dc72584669fcb1078d4021493239e9150abf /src/select.c
parentaf19f173d3b5172a46f65ab34cff77b8ed71cc3f (diff)
downloadsqlite-9a8941fc83f87b45e5c149b936bebc8bb254acde.tar.gz
sqlite-9a8941fc83f87b45e5c149b936bebc8bb254acde.zip
Have the sqlite3_column_decltype() API report the declared types for the left-most SELECT statement in a compound SELECT.
FossilOrigin-Name: 3e1d71fcaf57c0223ab9a7366c8607f8f66bb21c
Diffstat (limited to 'src/select.c')
-rw-r--r--src/select.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/select.c b/src/select.c
index cf486e5b8..c9d9637fc 100644
--- a/src/select.c
+++ b/src/select.c
@@ -2369,7 +2369,7 @@ static int multiSelect(
if( dest.eDest==SRT_Output ){
Select *pFirst = p;
while( pFirst->pPrior ) pFirst = pFirst->pPrior;
- generateColumnNames(pParse, 0, pFirst->pEList);
+ generateColumnNames(pParse, pFirst->pSrc, pFirst->pEList);
}
iBreak = sqlite3VdbeMakeLabel(v);
iCont = sqlite3VdbeMakeLabel(v);
@@ -2444,7 +2444,7 @@ static int multiSelect(
if( dest.eDest==SRT_Output ){
Select *pFirst = p;
while( pFirst->pPrior ) pFirst = pFirst->pPrior;
- generateColumnNames(pParse, 0, pFirst->pEList);
+ generateColumnNames(pParse, pFirst->pSrc, pFirst->pEList);
}
iBreak = sqlite3VdbeMakeLabel(v);
iCont = sqlite3VdbeMakeLabel(v);
@@ -3059,7 +3059,7 @@ static int multiSelectOrderBy(
if( pDest->eDest==SRT_Output ){
Select *pFirst = pPrior;
while( pFirst->pPrior ) pFirst = pFirst->pPrior;
- generateColumnNames(pParse, 0, pFirst->pEList);
+ generateColumnNames(pParse, pFirst->pSrc, pFirst->pEList);
}
/* Reassembly the compound query so that it will be freed correctly