SQLite

Check-in [dfc833ac79]
Login

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

Overview
Comment:Add vdbeaux.c to the list of files that must be compiled with -DSQLITE_TEST=1 in order to generate testfixture. Do not require sqlit3OsDelete() to succeed on a multi-database commit. (Ticket #1917) (CVS 3351)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: dfc833ac79cb255902b20700d6d8949a66af093f
User & Date: drh 2006-08-13 19:04:19.000
Context
2006-08-13
21:49
Adjust the Makefile.in so that there are no test errors when using the configure script. Ticket #1918. (CVS 3352) (check-in: 6a25be921b user: drh tags: trunk)
19:04
Add vdbeaux.c to the list of files that must be compiled with -DSQLITE_TEST=1 in order to generate testfixture. Do not require sqlit3OsDelete() to succeed on a multi-database commit. (Ticket #1917) (CVS 3351) (check-in: dfc833ac79 user: drh tags: trunk)
18:43
Vtab2.test script works regardless of what TCL version is used. (CVS 3350) (check-in: 6df3f6761a user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to main.mk.
145
146
147
148
149
150
151

152
153
154
155
156
157
158
  $(TOP)/src/test_md5.c \
  $(TOP)/src/test_schema.c \
  $(TOP)/src/test_server.c \
  $(TOP)/src/test_tclvar.c \
  $(TOP)/src/utf.c \
  $(TOP)/src/util.c \
  $(TOP)/src/vdbe.c \

  $(TOP)/src/where.c

# Header files used by all library source files.
#
HDR = \
   sqlite3.h  \
   $(TOP)/src/btree.h \







>







145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
  $(TOP)/src/test_md5.c \
  $(TOP)/src/test_schema.c \
  $(TOP)/src/test_server.c \
  $(TOP)/src/test_tclvar.c \
  $(TOP)/src/utf.c \
  $(TOP)/src/util.c \
  $(TOP)/src/vdbe.c \
  $(TOP)/src/vdbeaux.c \
  $(TOP)/src/where.c

# Header files used by all library source files.
#
HDR = \
   sqlite3.h  \
   $(TOP)/src/btree.h \
Changes to src/vdbeaux.c.
1141
1142
1143
1144
1145
1146
1147
1148


1149
1150
1151
1152
1153
1154
1155
    }

    /* Delete the master journal file. This commits the transaction. After
    ** doing this the directory is synced again before any individual
    ** transaction files are deleted.
    */
    rc = sqlite3OsDelete(zMaster);
    assert( rc==SQLITE_OK );


    sqliteFree(zMaster);
    zMaster = 0;
    rc = sqlite3OsSyncDirectory(zMainFile);
    if( rc!=SQLITE_OK ){
      /* This is not good. The master journal file has been deleted, but
      ** the directory sync failed. There is no completely safe course of
      ** action from here. The individual journals contain the name of the







|
>
>







1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
    }

    /* Delete the master journal file. This commits the transaction. After
    ** doing this the directory is synced again before any individual
    ** transaction files are deleted.
    */
    rc = sqlite3OsDelete(zMaster);
    if( rc ){
      return rc;
    }
    sqliteFree(zMaster);
    zMaster = 0;
    rc = sqlite3OsSyncDirectory(zMainFile);
    if( rc!=SQLITE_OK ){
      /* This is not good. The master journal file has been deleted, but
      ** the directory sync failed. There is no completely safe course of
      ** action from here. The individual journals contain the name of the
Changes to test/vtab2.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 2006 June 10
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# $Id: vtab2.test,v 1.5 2006/08/13 18:43:55 drh Exp $

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

ifcapable !vtab||!schema_pragmas {
  finish_test
  return












|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 2006 June 10
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# $Id: vtab2.test,v 1.6 2006/08/13 19:04:19 drh Exp $

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

ifcapable !vtab||!schema_pragmas {
  finish_test
  return
49
50
51
52
53
54
55


56
57
58
59
60
61
62
63
64
65
66


67
68
  set A(1) 1
  set A(2) 4
  set A(3) 9
  execsql {
    SELECT * FROM vars WHERE name='A';
  }
} [list A 1 1 A 2 4 A 3 9]


set result {}
foreach var [lsort [info vars tcl_*]] {
  catch {lappend result $var [set $var]}
}
do_test vtab2-2.3 {
  execsql {
    SELECT name, value FROM vars
      WHERE name MATCH 'tcl_*' AND arrayname = '' 
      ORDER BY name;
  }
} $result



finish_test







>
>











>
>


49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
  set A(1) 1
  set A(2) 4
  set A(3) 9
  execsql {
    SELECT * FROM vars WHERE name='A';
  }
} [list A 1 1 A 2 4 A 3 9]
unset -nocomplain result
unset -nocomplain var
set result {}
foreach var [lsort [info vars tcl_*]] {
  catch {lappend result $var [set $var]}
}
do_test vtab2-2.3 {
  execsql {
    SELECT name, value FROM vars
      WHERE name MATCH 'tcl_*' AND arrayname = '' 
      ORDER BY name;
  }
} $result
unset result
unset var

finish_test