SQLite

Check-in [f6590dac46]
Login

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

Overview
Comment:Reenable triggering vdbe tracing by creating file-system entries. Add a (redundant) test that modifying the temp schema expires all prepared statements. (CVS 6274)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f6590dac4612d0d05105fa820e8fcb80b5907a40
User & Date: danielk1977 2009-02-10 11:17:43.000
Context
2009-02-10
13:41
Create links from backup API documentation to the backup application note. Comment changes only - no changes to code. (CVS 6275) (check-in: 85de23fb4e user: drh tags: trunk)
11:17
Reenable triggering vdbe tracing by creating file-system entries. Add a (redundant) test that modifying the temp schema expires all prepared statements. (CVS 6274) (check-in: f6590dac46 user: danielk1977 tags: trunk)
10:44
Do not always open a transaction on the temp database when writing to the main or another attached database. (CVS 6273) (check-in: f76b0b8129 user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbe.c.
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
**
** Various scripts scan this source file in order to generate HTML
** documentation, headers files, or other derived files.  The formatting
** of the code in this file is, therefore, important.  See other comments
** 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.815 2009/02/09 13:19:28 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"

/*
** The following global variable is incremented every time a cursor
** moves, either by the OP_SeekXX, OP_Next, or OP_Prev opcodes.  The test







|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
**
** Various scripts scan this source file in order to generate HTML
** documentation, headers files, or other derived files.  The formatting
** of the code in this file is, therefore, important.  See other comments
** 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.816 2009/02/10 11:17:43 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"

/*
** The following global variable is incremented every time a cursor
** moves, either by the OP_SeekXX, OP_Next, or OP_Prev opcodes.  The test
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
** but that meant we more testing that we needed.  By only testing the
** flag on jump instructions, we get a (small) speed improvement.
*/
#define CHECK_FOR_INTERRUPT \
   if( db->u1.isInterrupted ) goto abort_due_to_interrupt;

#ifdef SQLITE_DEBUG
# define fileExists(A,B) 0
#endif
#if 0
static int fileExists(sqlite3 *db, const char *zFile){
  int res = 0;
  int rc = SQLITE_OK;
#ifdef SQLITE_TEST
  /* If we are currently testing IO errors, then do not call OsAccess() to
  ** test for the presence of zFile. This is because any IO error that
  ** occurs here will not be reported, causing the test to fail.







<
<
<







478
479
480
481
482
483
484



485
486
487
488
489
490
491
** but that meant we more testing that we needed.  By only testing the
** flag on jump instructions, we get a (small) speed improvement.
*/
#define CHECK_FOR_INTERRUPT \
   if( db->u1.isInterrupted ) goto abort_due_to_interrupt;

#ifdef SQLITE_DEBUG



static int fileExists(sqlite3 *db, const char *zFile){
  int res = 0;
  int rc = SQLITE_OK;
#ifdef SQLITE_TEST
  /* If we are currently testing IO errors, then do not call OsAccess() to
  ** test for the presence of zFile. This is because any IO error that
  ** occurs here will not be reported, causing the test to fail.
Changes to test/temptable.test.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests for temporary tables and indices.
#
# $Id: temptable.test,v 1.19 2007/10/09 08:29:33 danielk1977 Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

ifcapable !tempdb {
  finish_test
  return







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests for temporary tables and indices.
#
# $Id: temptable.test,v 1.20 2009/02/10 11:17:43 danielk1977 Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

ifcapable !tempdb {
  finish_test
  return
414
415
416
417
418
419
420
421


















422
}

# Need to do the following for tcl 8.5 on mac. On that configuration, the
# -readonly flag is taken so seriously that a subsequent [file delete -force]
# (required before the next test file can be executed) will fail.
#
catch {file attributes test.db -readonly 0}



















finish_test








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
}

# Need to do the following for tcl 8.5 on mac. On that configuration, the
# -readonly flag is taken so seriously that a subsequent [file delete -force]
# (required before the next test file can be executed) will fail.
#
catch {file attributes test.db -readonly 0}

do_test temptable-8.0 {
  db close
  catch {file delete -force test.db}
  sqlite3 db test.db
} {}
do_test temptable-8.1 {
  execsql { CREATE TEMP TABLE tbl2(a, b); }
  execsql {
    CREATE TABLE tbl(a, b);
    INSERT INTO tbl VALUES(1, 2);
  }
  execsql {SELECT * FROM tbl}
} {1 2}
do_test temptable-8.2 {
  execsql { CREATE TEMP TABLE tbl(a, b); }
  execsql {SELECT * FROM tbl}
} {}

finish_test