/ Check-in [c080ed01]
Login

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

Overview
Comment:UPDATE triggers on TEMP tables were broken. (CVS 693)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c080ed01ea51628b86050762f097e702e3aeafdf
User & Date: danielk1977 2002-07-21 23:09:55
Context
2002-07-30
17:20
Fix for ticket #71: Correctly handle CR and CRLF line terminators in the input files for the COPY command. (CVS 694) check-in: be131575 user: drh tags: trunk
2002-07-21
23:09
UPDATE triggers on TEMP tables were broken. (CVS 693) check-in: c080ed01 user: danielk1977 tags: trunk
2002-07-19
19:04
Version 2.6.1 (CVS 691) check-in: 610b7bc7 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/update.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains C code routines that are called by the parser
    13     13   ** to handle UPDATE statements.
    14     14   **
    15         -** $Id: update.c,v 1.48 2002/07/16 17:22:51 drh Exp $
           15  +** $Id: update.c,v 1.49 2002/07/21 23:09:55 danielk1977 Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   
    19     19   /*
    20     20   ** Process an UPDATE statement.
    21     21   */
    22     22   void sqliteUpdate(
................................................................................
   214    214       sqliteVdbeAddOp(v, OP_OpenTemp, newIdx, 0);
   215    215   
   216    216       sqliteVdbeAddOp(v, OP_ListRewind, 0, 0);
   217    217       addr = sqliteVdbeAddOp(v, OP_ListRead, 0, 0);
   218    218       sqliteVdbeAddOp(v, OP_Dup, 0, 0);
   219    219   
   220    220       sqliteVdbeAddOp(v, OP_Dup, 0, 0);
   221         -    sqliteVdbeAddOp(v, OP_Open, base, pTab->tnum);
          221  +    sqliteVdbeAddOp(v, (pTab->isTemp?OP_OpenAux:OP_Open), base, pTab->tnum);
   222    222       sqliteVdbeAddOp(v, OP_MoveTo, base, 0);
   223    223   
   224    224       sqliteVdbeAddOp(v, OP_Integer, 13, 0);
   225    225       for(ii = 0; ii < pTab->nCol; ii++){
   226    226         if( ii == pTab->iPKey ){
   227    227   	sqliteVdbeAddOp(v, OP_Recno, base, 0);
   228    228         }else{

Changes to test/trigger2.test.

    50     50   set testdir [file dirname $argv0]
    51     51   source $testdir/tester.tcl
    52     52   
    53     53   # 1.
    54     54   set ii 0
    55     55   foreach tbl_defn [ list \
    56     56   	{CREATE TABLE tbl (a, b);} \
           57  +	{CREATE TEMP TABLE tbl (a, b);} \
    57     58   	{CREATE TABLE tbl (a INTEGER PRIMARY KEY, b);} \
    58     59           {CREATE TABLE tbl (a, b PRIMARY KEY);} \
    59     60   	{CREATE TABLE tbl (a, b); CREATE INDEX tbl_idx ON tbl(b);} ] {
    60     61     incr ii
    61     62     catchsql { DROP INDEX tbl_idx; }
    62     63     catchsql {
    63     64       DROP TABLE rlog;