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

Reinsert an SCopy operation that was removed in (5523) because coverage

testing indicated that it was dead code.  Ticket #3324 shows that the
code was not as dead as we thought it was. (CVS 5578)

FossilOrigin-Name: 6855711595b58d4b6fbaf9480720b788904d0e2d
This commit is contained in:
drh
2008-08-21 14:15:59 +00:00
parent 69556698e0
commit 6a012f04d5
4 changed files with 75 additions and 24 deletions

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
** $Id: select.c,v 1.466 2008/08/20 16:35:10 drh Exp $
** $Id: select.c,v 1.467 2008/08/21 14:15:59 drh Exp $
*/
#include "sqliteInt.h"
@@ -3773,20 +3773,14 @@ int sqlite3Select(
struct AggInfo_col *pCol = &sAggInfo.aCol[i];
if( pCol->iSorterColumn>=j ){
int r1 = j + regBase;
#ifndef NDEBUG
int r2 =
#endif
sqlite3ExprCodeGetColumn(pParse,
pCol->pTab, pCol->iColumn, pCol->iTable, r1, 0);
j++;
int r2;
/* sAggInfo.aCol[] only contains one entry per column. So
** The reference to pCol->iColumn,pCol->iTable must have been
** the first reference to that column. Hence,
** sqliteExprCodeGetColumn is guaranteed to put the result in
** the column requested.
*/
assert( r1==r2 );
r2 = sqlite3ExprCodeGetColumn(pParse,
pCol->pTab, pCol->iColumn, pCol->iTable, r1, 0);
if( r1!=r2 ){
sqlite3VdbeAddOp2(v, OP_SCopy, r2, r1);
}
j++;
}
}
regRecord = sqlite3GetTempReg(pParse);