/ Check-in [4cfc5a36]
Login

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

Overview
Comment:Schema modifications are committed internally when a statement transaction is committed. (CVS 1592)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4cfc5a36e9891a9b69209f94194fc492e203ab75
User & Date: danielk1977 2004-06-14 13:14:59
Context
2004-06-14
23:46
Update some old tests to use the new API. (CVS 1593) check-in: af6edd2c user: danielk1977 tags: trunk
13:14
Schema modifications are committed internally when a statement transaction is committed. (CVS 1592) check-in: 4cfc5a36 user: danielk1977 tags: trunk
11:54
Fix a bug in the auth.test script. (CVS 1590) check-in: 1fa97dd8 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

    39     39   **
    40     40   ** Various scripts scan this source file in order to generate HTML
    41     41   ** documentation, headers files, or other derived files.  The formatting
    42     42   ** of the code in this file is, therefore, important.  See other comments
    43     43   ** in this file for details.  If in doubt, do not deviate from existing
    44     44   ** commenting and indentation practices when changing or adding code.
    45     45   **
    46         -** $Id: vdbe.c,v 1.371 2004/06/14 05:10:43 danielk1977 Exp $
           46  +** $Id: vdbe.c,v 1.372 2004/06/14 13:14:59 danielk1977 Exp $
    47     47   */
    48     48   #include "sqliteInt.h"
    49     49   #include "os.h"
    50     50   #include <ctype.h>
    51     51   #include "vdbeInt.h"
    52     52   
    53     53   /*
................................................................................
  4707   4707     assert( db->flags & SQLITE_Interrupt );
  4708   4708     db->flags &= ~SQLITE_Interrupt;
  4709   4709     if( db->magic!=SQLITE_MAGIC_BUSY ){
  4710   4710       rc = SQLITE_MISUSE;
  4711   4711     }else{
  4712   4712       rc = SQLITE_INTERRUPT;
  4713   4713     }
         4714  +  p->rc = rc;
  4714   4715     sqlite3SetString(&p->zErrMsg, sqlite3ErrStr(rc), (char*)0);
  4715   4716     goto vdbe_halt;
  4716   4717   }

Changes to src/vdbeaux.c.

  1147   1147       for(i=0; i<db->nDb; i++){ 
  1148   1148         Btree *pBt = db->aDb[i].pBt;
  1149   1149         if( pBt ){
  1150   1150           sqlite3BtreeCommit(pBt);
  1151   1151         }
  1152   1152       }
  1153   1153     }
         1154  +
  1154   1155     return rc;
  1155   1156   }
  1156   1157   
  1157   1158   /* 
  1158   1159   ** This routine checks that the sqlite3.activeVdbeCnt count variable
  1159   1160   ** matches the number of vdbe's in the list sqlite3.pVdbe that are
  1160   1161   ** currently active. An assertion fails if the two counts do not match.
................................................................................
  1271   1272         if( p->rc==SQLITE_OK ) p->rc = rc;
  1272   1273       }
  1273   1274     }
  1274   1275   
  1275   1276   
  1276   1277     if( p->rc!=SQLITE_OK ){
  1277   1278       sqlite3RollbackInternalChanges(db);
         1279  +  }else if( db->flags & SQLITE_InternChanges ){
         1280  +    db->flags &= ~SQLITE_InternChanges;
  1278   1281     }
  1279   1282   
  1280   1283     if( (p->magic==VDBE_MAGIC_RUN && p->pc>=0) || p->magic==VDBE_MAGIC_HALT ){
  1281   1284       db->activeVdbeCnt--;
  1282   1285     }
  1283   1286   
  1284   1287     assert( p->pTos<&p->aStack[p->pc<0?0:p->pc] || sqlite3_malloc_failed==1 );

Changes to test/quick.test.

     6      6   #    May you do good and not evil.
     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file runs all tests.
    12     12   #
    13         -# $Id: quick.test,v 1.19 2004/05/24 07:34:49 danielk1977 Exp $
           13  +# $Id: quick.test,v 1.20 2004/06/14 13:14:59 danielk1977 Exp $
    14     14   
    15     15   set testdir [file dirname $argv0]
    16     16   source $testdir/tester.tcl
    17     17   rename finish_test really_finish_test
    18     18   proc finish_test {} {}
    19     19   set ISQUICK 1
    20     20   
................................................................................
    24     24     btree2.test
    25     25     malloc.test
    26     26     memleak.test
    27     27     misuse.test
    28     28     format3.test
    29     29   }
    30     30   
    31         -lappend EXCLUDE interrupt.test    ;# assert() fails in btree
    32     31   lappend EXCLUDE ioerr.test        ;# seg-faults (?)
    33     32   lappend EXCLUDE memdb.test        ;# fails - malformed database
    34     33   
    35     34   lappend EXCLUDE printf.test       ;# sqlite3_XX vs sqlite_XX problem
    36         -lappend EXCLUDE auth.test         ;# Cannot attach empty databases.
    37     35   lappend EXCLUDE tableapi.test     ;# sqlite3_XX vs sqlite_XX problem
    38     36   lappend EXCLUDE version.test      ;# uses the btree_meta API (not updated)
    39     37   
    40     38   # Some tests fail in these file as a result of the partial manifest types
    41     39   # implementation.
    42     40   lappend EXCLUDE capi2.test 
    43     41