/ Check-in [5d506743]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove an unnecessary temporary register allocation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | orderby-planning
Files: files | file ages | folders
SHA1: 5d506743f541b022cde04a9606baa4680cdfd70b
User & Date: dan 2014-03-24 09:34:58
Context
2014-03-24
18:08
Avoid unnecessary moving of content between registers during an ORDER BY. check-in: 4f472acc user: drh tags: orderby-planning
09:34
Remove an unnecessary temporary register allocation. check-in: 5d506743 user: dan tags: orderby-planning
02:20
Remove a pointless OP_Once operation in ORDER BY clauses with LIMIT. check-in: e6c59d23 user: drh tags: orderby-planning
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/select.c.

1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156

  if( pSort->labelBkOut ){
    sqlite3VdbeAddOp2(v, OP_Gosub, pSort->regReturn, pSort->labelBkOut);
    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrBreak);
    sqlite3VdbeResolveLabel(v, pSort->labelBkOut);
  }
  iTab = pSort->iECursor;
  regRow = sqlite3GetTempReg(pParse);
  if( eDest==SRT_Output || eDest==SRT_Coroutine ){
    regRowid = 0;
    regRow = pDest->iSdst;
    nSortData = nColumn;
  }else{
    regRowid = sqlite3GetTempReg(pParse);
    regRow = sqlite3GetTempReg(pParse);







<







1142
1143
1144
1145
1146
1147
1148

1149
1150
1151
1152
1153
1154
1155

  if( pSort->labelBkOut ){
    sqlite3VdbeAddOp2(v, OP_Gosub, pSort->regReturn, pSort->labelBkOut);
    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrBreak);
    sqlite3VdbeResolveLabel(v, pSort->labelBkOut);
  }
  iTab = pSort->iECursor;

  if( eDest==SRT_Output || eDest==SRT_Coroutine ){
    regRowid = 0;
    regRow = pDest->iSdst;
    nSortData = nColumn;
  }else{
    regRowid = sqlite3GetTempReg(pParse);
    regRow = sqlite3GetTempReg(pParse);