/ Check-in [27cf8322]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Another fix along the same lines as (2234) (CVS 2235)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 27cf83224c69e661c19f9a09f39bfdae75e3b0a4
User & Date: danielk1977 2005-01-19 03:52:55
Context
2005-01-19
23:24
Continued refactoring of the name resolution logic and query optimizer. (CVS 2236) check-in: d8b2a7e0 user: drh tags: trunk
03:52
Another fix along the same lines as (2234) (CVS 2235) check-in: 27cf8322 user: danielk1977 tags: trunk
03:47
A few test cases were failing on windows due to mandatory locking. Omit them on that platform. (CVS 2234) check-in: 441316f1 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/malloc.test.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
350
351
352
353
354
355
356

357
358
359
360
361
362
363
...
368
369
370
371
372
373
374

375
376
377
378
379
380
381
382
383
384
#***********************************************************************
# This file attempts to check the library in an out-of-memory situation.
# When compiled with -DSQLITE_DEBUG=1, the SQLite library accepts a special
# command (sqlite_malloc_fail N) which causes the N-th malloc to fail.  This
# special feature is used to see what happens in the library if a malloc
# were to really fail due to an out-of-memory situation.
#
# $Id: malloc.test,v 1.20 2005/01/13 13:35:58 danielk1977 Exp $

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

# Only run these tests if memory debugging is turned on.
#
if {[info command sqlite_malloc_stat]==""} {
................................................................................
  } -sqlbody {
    ATTACH 'test2.db' as aux;
    SELECT * FROM t1;
    SELECT * FROM t2;
  }
}


do_malloc_test 14 -tclprep {
  catch {db close}
  sqlite3 db2 test2.db
  db2 eval {
    PRAGMA synchronous = 0;
    CREATE TABLE t1(a, b);
    INSERT INTO t1 VALUES(1, 2);
................................................................................
  file copy -force test2.db-journal test.db-journal
  db2 close
} -tclbody {
  sqlite3 db test.db
  db eval {
    SELECT * FROM t1;
  }  

}

# Ensure that no file descriptors were leaked.
do_test malloc-99.X {
  catch {db close}
  set sqlite_open_file_count
} {0}

sqlite_malloc_fail 0
finish_test







|







 







>







 







>










10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
...
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
#***********************************************************************
# This file attempts to check the library in an out-of-memory situation.
# When compiled with -DSQLITE_DEBUG=1, the SQLite library accepts a special
# command (sqlite_malloc_fail N) which causes the N-th malloc to fail.  This
# special feature is used to see what happens in the library if a malloc
# were to really fail due to an out-of-memory situation.
#
# $Id: malloc.test,v 1.21 2005/01/19 03:52:55 danielk1977 Exp $

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

# Only run these tests if memory debugging is turned on.
#
if {[info command sqlite_malloc_stat]==""} {
................................................................................
  } -sqlbody {
    ATTACH 'test2.db' as aux;
    SELECT * FROM t1;
    SELECT * FROM t2;
  }
}

if {$tcl_platform(platform)!="windows"} {
do_malloc_test 14 -tclprep {
  catch {db close}
  sqlite3 db2 test2.db
  db2 eval {
    PRAGMA synchronous = 0;
    CREATE TABLE t1(a, b);
    INSERT INTO t1 VALUES(1, 2);
................................................................................
  file copy -force test2.db-journal test.db-journal
  db2 close
} -tclbody {
  sqlite3 db test.db
  db eval {
    SELECT * FROM t1;
  }  
}
}

# Ensure that no file descriptors were leaked.
do_test malloc-99.X {
  catch {db close}
  set sqlite_open_file_count
} {0}

sqlite_malloc_fail 0
finish_test