aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vdbe.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/vdbe.c b/src/vdbe.c
index 0b21787e0..0e3d8bc33 100644
--- a/src/vdbe.c
+++ b/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.257 2004/02/08 18:07:35 drh Exp $
+** $Id: vdbe.c,v 1.258 2004/02/10 13:41:52 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -3784,11 +3784,21 @@ case OP_ListWrite: {
/* Opcode: ListRewind * * *
**
-** Rewind the temporary buffer back to the beginning. This is
-** now a no-op.
+** Rewind the temporary buffer back to the beginning.
*/
case OP_ListRewind: {
- /* This is now a no-op */
+ /* What this opcode codes, really, is reverse the order of the
+ ** linked list of Keylist structures so that they are read out
+ ** in the same order that they were read in. */
+ Keylist *pRev, *pTop;
+ pRev = 0;
+ while( p->pList ){
+ pTop = p->pList;
+ p->pList = pTop->pNext;
+ pTop->pNext = pRev;
+ pRev = pTop;
+ }
+ p->pList = pRev;
break;
}