/ Check-in [92126a21]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix uninitialized value on a UNION ALL select with an ORDER BY clause. (CVS 2722)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 92126a216101d30e16390bf063d52d7182fbc763
User & Date: drh 2005-09-19 15:37:07
Context
2005-09-19
17:35
Do not optimize views with an ORDER BY clause if they are used in a UNION ALL that also has an ORDER BY clause. Ticket #1444. (CVS 2723) check-in: 6cc57fcf user: drh tags: trunk
15:37
Fix uninitialized value on a UNION ALL select with an ORDER BY clause. (CVS 2722) check-in: 92126a21 user: drh tags: trunk
13:15
The sqlite3_query_plan debugging variable now only appears with SQLITE_TEST=1. (CVS 2721) check-in: 41e226d2 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains C code routines that are called by the parser
    13     13   ** to handle SELECT statements in SQLite.
    14     14   **
    15         -** $Id: select.c,v 1.269 2005/09/12 23:03:17 drh Exp $
           15  +** $Id: select.c,v 1.270 2005/09/19 15:37:07 drh Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   
    19     19   
    20     20   /*
    21     21   ** Allocate a new Select structure and return a pointer to that
    22     22   ** structure.
................................................................................
  1782   1782           }
  1783   1783           *pSortOrder = pOTerm->sortOrder;
  1784   1784         }
  1785   1785         assert( p->pRightmost==p );
  1786   1786         assert( p->addrOpenVirt[2]>=0 );
  1787   1787         addr = p->addrOpenVirt[2];
  1788   1788         sqlite3VdbeChangeP2(v, addr, p->pEList->nExpr+2);
         1789  +      pKeyInfo->nField = pOrderBy->nExpr;
  1789   1790         sqlite3VdbeChangeP3(v, addr, (char*)pKeyInfo, P3_KEYINFO_HANDOFF);
  1790   1791         pKeyInfo = 0;
  1791   1792         generateSortTail(pParse, p, v, p->pEList->nExpr, eDest, iParm);
  1792   1793       }
  1793   1794   
  1794   1795       sqliteFree(pKeyInfo);
  1795   1796     }