/ Check-in [92126a21]
Login

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 Unified Diffs Ignore Whitespace Patch

Changes to src/select.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
....
1782
1783
1784
1785
1786
1787
1788

1789
1790
1791
1792
1793
1794
1795
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
** $Id: select.c,v 1.269 2005/09/12 23:03:17 drh Exp $
*/
#include "sqliteInt.h"


/*
** Allocate a new Select structure and return a pointer to that
** structure.
................................................................................
        }
        *pSortOrder = pOTerm->sortOrder;
      }
      assert( p->pRightmost==p );
      assert( p->addrOpenVirt[2]>=0 );
      addr = p->addrOpenVirt[2];
      sqlite3VdbeChangeP2(v, addr, p->pEList->nExpr+2);

      sqlite3VdbeChangeP3(v, addr, (char*)pKeyInfo, P3_KEYINFO_HANDOFF);
      pKeyInfo = 0;
      generateSortTail(pParse, p, v, p->pEList->nExpr, eDest, iParm);
    }

    sqliteFree(pKeyInfo);
  }







|







 







>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
....
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
** $Id: select.c,v 1.270 2005/09/19 15:37:07 drh Exp $
*/
#include "sqliteInt.h"


/*
** Allocate a new Select structure and return a pointer to that
** structure.
................................................................................
        }
        *pSortOrder = pOTerm->sortOrder;
      }
      assert( p->pRightmost==p );
      assert( p->addrOpenVirt[2]>=0 );
      addr = p->addrOpenVirt[2];
      sqlite3VdbeChangeP2(v, addr, p->pEList->nExpr+2);
      pKeyInfo->nField = pOrderBy->nExpr;
      sqlite3VdbeChangeP3(v, addr, (char*)pKeyInfo, P3_KEYINFO_HANDOFF);
      pKeyInfo = 0;
      generateSortTail(pParse, p, v, p->pEList->nExpr, eDest, iParm);
    }

    sqliteFree(pKeyInfo);
  }