/ Check-in [96f70741]
Login

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

Overview
Comment:Fix a critical bug in the creation of temporary tables. (CVS 327)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:96f707413699eec16053a0323affbe8bf3760c14
User & Date: drh 2001-12-15 02:35:59
Context
2001-12-15
02:47
Fix a bug in the sqliteBtreeFirst() function which was causing the first row of a table to be repeated during a scan. (CVS 328) check-in: 1404ac07 user: drh tags: trunk
02:35
Fix a critical bug in the creation of temporary tables. (CVS 327) check-in: 96f70741 user: drh tags: trunk
2001-12-14
15:15
Version 2.1.6 (CVS 455) check-in: 6ecd90b6 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/build.c.

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
**     COPY
**     VACUUM
**     BEGIN TRANSACTION
**     COMMIT
**     ROLLBACK
**     PRAGMA
**
** $Id: build.c,v 1.58 2001/12/05 00:21:20 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** This routine is called after a single SQL statement has been
** parsed and we want to execute the VDBE code to implement 
................................................................................
      sqliteVdbeAddOp(v, OP_String, 0, 0);
      sqliteVdbeChangeP3(v, -1, "table", P3_STATIC);
      sqliteVdbeAddOp(v, OP_String, 0, 0);
      sqliteVdbeChangeP3(v, -1, p->zName, P3_STATIC);
      sqliteVdbeAddOp(v, OP_String, 0, 0);
      sqliteVdbeChangeP3(v, -1, p->zName, P3_STATIC);
    }
    addr = sqliteVdbeAddOp(v, OP_CreateTable, 0, 0);
    sqliteVdbeChangeP3(v, addr, (char *)&p->tnum, P3_POINTER);
    p->tnum = 0;
    if( !p->isTemp ){
      addr = sqliteVdbeAddOp(v, OP_String, 0, 0);
      sqliteVdbeChangeP3(v, addr, pParse->sFirstToken.z, n);
      sqliteVdbeAddOp(v, OP_MakeRecord, 5, 0);
      sqliteVdbeAddOp(v, OP_Put, 0, 0);







|







 







|







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
**     COPY
**     VACUUM
**     BEGIN TRANSACTION
**     COMMIT
**     ROLLBACK
**     PRAGMA
**
** $Id: build.c,v 1.59 2001/12/15 02:35:59 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** This routine is called after a single SQL statement has been
** parsed and we want to execute the VDBE code to implement 
................................................................................
      sqliteVdbeAddOp(v, OP_String, 0, 0);
      sqliteVdbeChangeP3(v, -1, "table", P3_STATIC);
      sqliteVdbeAddOp(v, OP_String, 0, 0);
      sqliteVdbeChangeP3(v, -1, p->zName, P3_STATIC);
      sqliteVdbeAddOp(v, OP_String, 0, 0);
      sqliteVdbeChangeP3(v, -1, p->zName, P3_STATIC);
    }
    addr = sqliteVdbeAddOp(v, OP_CreateTable, 0, p->isTemp);
    sqliteVdbeChangeP3(v, addr, (char *)&p->tnum, P3_POINTER);
    p->tnum = 0;
    if( !p->isTemp ){
      addr = sqliteVdbeAddOp(v, OP_String, 0, 0);
      sqliteVdbeChangeP3(v, addr, pParse->sFirstToken.z, n);
      sqliteVdbeAddOp(v, OP_MakeRecord, 5, 0);
      sqliteVdbeAddOp(v, OP_Put, 0, 0);