aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2008-09-23 09:36:10 +0000
committerdrh <drh@noemail.net>2008-09-23 09:36:10 +0000
commit96067816678dffda2850f90c3339d52ccfc697fb (patch)
tree5d103e3501e6565aeb06b13c99084980b16af1f1 /src/select.c
parent4d6618f9ed22b425b2872ad6b14f853af859e86b (diff)
downloadsqlite-96067816678dffda2850f90c3339d52ccfc697fb.tar.gz
sqlite-96067816678dffda2850f90c3339d52ccfc697fb.zip
Fix for ticket #3382 was mistakenly removed by (5712). Add an assert to
prevent it from being removed again. (CVS 5733) FossilOrigin-Name: 01d26b3df7029f7fa09231c18a7b9f9a1a967916
Diffstat (limited to 'src/select.c')
-rw-r--r--src/select.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/select.c b/src/select.c
index 5871491c4..adbf9e432 100644
--- a/src/select.c
+++ b/src/select.c
@@ -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.475 2008/09/17 00:13:12 drh Exp $
+** $Id: select.c,v 1.476 2008/09/23 09:36:10 drh Exp $
*/
#include "sqliteInt.h"
@@ -2047,7 +2047,7 @@ static int multiSelectOrderBy(
int labelEnd; /* Label for the end of the overall SELECT stmt */
int j1; /* Jump instructions that get retargetted */
int op; /* One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT */
- KeyInfo *pKeyDup; /* Comparison information for duplicate removal */
+ KeyInfo *pKeyDup = 0; /* Comparison information for duplicate removal */
KeyInfo *pKeyMerge; /* Comparison information for merging rows */
sqlite3 *db; /* Database connection */
ExprList *pOrderBy; /* The ORDER BY clause */
@@ -2055,6 +2055,7 @@ static int multiSelectOrderBy(
int *aPermute; /* Mapping from ORDER BY terms to result set columns */
assert( p->pOrderBy!=0 );
+ assert( pKeyDup==0 ); /* "Managed" code needs this. Ticket #3382. */
db = pParse->db;
v = pParse->pVdbe;
if( v==0 ) return SQLITE_NOMEM;