Reinsert code deleted by (1998) that we thought was unused but was in fact
needed. Fix for ticket #966. (CVS 2025) FossilOrigin-Name: 370ca539506a431dbe77dcb644215886760f34e9
This commit is contained in:
parent
63afe89499
commit
6138df56e7
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\sa\stypo\sin\sthe\squickstart\sdocument.\s(CVS\s2024)
|
||||
D 2004-10-19T01:31:20
|
||||
C Reinsert\scode\sdeleted\sby\s(1998)\sthat\swe\sthought\swas\sunused\sbut\swas\sin\sfact\r\nneeded.\s\sFix\sfor\sticket\s#966.\s(CVS\s2025)
|
||||
D 2004-10-19T16:40:59
|
||||
F Makefile.in 52c1cc106cad9148d4b7cb387b458e82dc86b339
|
||||
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
||||
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
|
||||
@ -76,7 +76,7 @@ F src/update.c 174c3b593b8f4928e510a51ec309e8ce69d2371c
|
||||
F src/utf.c f4f83acd73389090e32d6589d307fc55d794c7ed
|
||||
F src/util.c f4ab796b9def353feed2191d7ce8e39a0f5059cd
|
||||
F src/vacuum.c 257de36230cb988842f66eb08dc6c0250b8e05f3
|
||||
F src/vdbe.c 02fd01b71868c7a670234e92c8e64316d48a3127
|
||||
F src/vdbe.c adbcdbc817ae2f411904cd12582f06fc1ca8be1e
|
||||
F src/vdbe.h 067ca8d6750ba4f69a50284765e5883dee860181
|
||||
F src/vdbeInt.h 6017100adff362b8dfa37a69e3f1431f084bfa5b
|
||||
F src/vdbeapi.c 81ab9e84c55f5762f552904e6e5d309269b02017
|
||||
@ -147,7 +147,7 @@ F test/minmax.test c0f92d3f7b11656221735385f2c8b1878bbbdaf6
|
||||
F test/misc1.test 1a20ea722dff15155e93948dc4ac3e8d80fec386
|
||||
F test/misc2.test 703734f5817215ca54e364833b3bf5ff36fcc21e
|
||||
F test/misc3.test 57c373aed45acdf45f8f78ea914ef8855841e6b7
|
||||
F test/misc4.test 9f8ab4896dd627f5f9ba893a7b57c9f0a95dfd64
|
||||
F test/misc4.test d005a75f095bb04db09a5d096144405ae566b622
|
||||
F test/misuse.test fcd9e7cec6ecccc34822584aec6b4e31f13629e1
|
||||
F test/notnull.test 7a08117a71e74b0321aaa937dbeb41a09d6eb1d0
|
||||
F test/null.test 642428b6a5408cc5b954b49e1b6e5025e4458b2b
|
||||
@ -252,7 +252,7 @@ F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25
|
||||
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
|
||||
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
|
||||
F www/whentouse.tcl fdacb0ba2d39831e8a6240d05a490026ad4c4e4c
|
||||
P 77542beb31349b85bdf404c46980da346dde3266
|
||||
R 1123ff5a190f3a3d9924f56a26743d11
|
||||
P 55b03c560d2f66c55d64c3e9f9577e33f8c63195
|
||||
R 462557c854f7b30b37ca39ec9dc0db3d
|
||||
U drh
|
||||
Z 3306edbad41620ea46cbe737f2e21213
|
||||
Z e8f25bd39be0085dd77f02f0608ae8de
|
||||
|
@ -1 +1 @@
|
||||
55b03c560d2f66c55d64c3e9f9577e33f8c63195
|
||||
370ca539506a431dbe77dcb644215886760f34e9
|
17
src/vdbe.c
17
src/vdbe.c
@ -43,7 +43,7 @@
|
||||
** in this file for details. If in doubt, do not deviate from existing
|
||||
** commenting and indentation practices when changing or adding code.
|
||||
**
|
||||
** $Id: vdbe.c,v 1.418 2004/10/06 15:41:17 drh Exp $
|
||||
** $Id: vdbe.c,v 1.419 2004/10/19 16:40:59 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@ -4237,7 +4237,20 @@ case OP_AggGet: {
|
||||
AggElem *pFocus;
|
||||
int i = pOp->p2;
|
||||
pFocus = p->agg.pCurrent;
|
||||
if( pFocus==0 ) goto no_mem;
|
||||
if( pFocus==0 ){
|
||||
int res;
|
||||
if( sqlite3_malloc_failed ) goto no_mem;
|
||||
rc = sqlite3BtreeFirst(p->agg.pCsr, &res);
|
||||
if( rc!=SQLITE_OK ){
|
||||
return rc;
|
||||
}
|
||||
if( res!=0 ){
|
||||
rc = AggInsert(&p->agg,"",1);
|
||||
pFocus = p->agg.pCurrent;
|
||||
}else{
|
||||
rc = sqlite3BtreeData(p->agg.pCsr, 0, 4, (char *)&pFocus);
|
||||
}
|
||||
}
|
||||
assert( i>=0 && i<p->agg.nMem );
|
||||
pTos++;
|
||||
sqlite3VdbeMemShallowCopy(pTos, &pFocus->aMem[i], MEM_Ephem);
|
||||
|
@ -13,7 +13,7 @@
|
||||
# This file implements tests for miscellanous features that were
|
||||
# left out of other test files.
|
||||
#
|
||||
# $Id: misc4.test,v 1.6 2004/07/24 17:38:30 drh Exp $
|
||||
# $Id: misc4.test,v 1.7 2004/10/19 16:40:59 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -82,5 +82,20 @@ do_test misc4-2.4 {
|
||||
}
|
||||
} {0 {}}
|
||||
|
||||
# Ticket #966
|
||||
#
|
||||
do_test misc4-3.1 {
|
||||
execsql {
|
||||
CREATE TABLE Table1(ID integer primary key, Value TEXT);
|
||||
INSERT INTO Table1 VALUES(1, 'x');
|
||||
CREATE TABLE Table2(ID integer NOT NULL, Value TEXT);
|
||||
INSERT INTO Table2 VALUES(1, 'z');
|
||||
INSERT INTO Table2 VALUES (1, 'a');
|
||||
SELECT ID, Value FROM Table1
|
||||
UNION SELECT ID, max(Value) FROM Table2 GROUP BY 1,2
|
||||
ORDER BY 1, 2;
|
||||
}
|
||||
} {{} {} 1 x 1 z}
|
||||
|
||||
|
||||
finish_test
|
||||
|
Loading…
x
Reference in New Issue
Block a user