/ Check-in [e171f372]
Login

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

Overview
Comment:Fix a few small test script issues affecting SQLITE_TEMP_STORE=3 builds.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e171f3722f78c58d2f20443e3bbcce2bd9701b8537f6e8d482ae804154d7a17f
User & Date: dan 2018-04-03 17:05:13
Context
2018-04-03
20:00
Update speedtest1.c with new testset "trigger" based on the tests in speed4p.test. check-in: 7b7fa5fa user: dan tags: trunk
17:05
Fix a few small test script issues affecting SQLITE_TEMP_STORE=3 builds. check-in: e171f372 user: dan tags: trunk
14:25
Fix the generate_series virtual table so that it correctly returns no rows if any of its constraints are NULL. Ticket [fac496b61722daf28]. check-in: 3328e828 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/sort5.test.

69
70
71
72
73
74
75

76
77
78
79
80
81
82
..
84
85
86
87
88
89
90



91
92
93
94
95
96
97
  }
}

catch { db close }
forcedelete test.db
sqlite3 db test.db -vfs tvfs
execsql { CREATE TABLE t1(x) }


# Each iteration of the following loop attempts to sort 10001 records
# each a bit over 100 bytes in size. In total a little more than 1MiB 
# of data.
#
foreach {tn pgsz cachesz bTemp} {
  1 4096   1000  0
................................................................................

  3 4096  -1000  1
  4 1024  -1000  1

  5 4096  -9000  0
  6 1024  -9000  0
} {



  do_execsql_test 2.$tn.0 "
    PRAGMA page_size = $pgsz;
    VACUUM;
    PRAGMA cache_size = $cachesz;
  "

  if {[db one {PRAGMA page_size}]!=$pgsz} {







>







 







>
>
>







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
..
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
  }
}

catch { db close }
forcedelete test.db
sqlite3 db test.db -vfs tvfs
execsql { CREATE TABLE t1(x) }
execsql { PRAGMA temp_store = 1 }

# Each iteration of the following loop attempts to sort 10001 records
# each a bit over 100 bytes in size. In total a little more than 1MiB 
# of data.
#
foreach {tn pgsz cachesz bTemp} {
  1 4096   1000  0
................................................................................

  3 4096  -1000  1
  4 1024  -1000  1

  5 4096  -9000  0
  6 1024  -9000  0
} {
  if {$::TEMP_STORE>2} {
    set bTemp 0
  }
  do_execsql_test 2.$tn.0 "
    PRAGMA page_size = $pgsz;
    VACUUM;
    PRAGMA cache_size = $cachesz;
  "

  if {[db one {PRAGMA page_size}]!=$pgsz} {

Changes to test/tempdb2.test.

12
13
14
15
16
17
18



19
20
21
22
23
24
25
..
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix tempdb2

db close
sqlite3 db ""




proc int2str {i} { string range [string repeat "$i." 450] 0 899 }
db func int2str int2str

#-------------------------------------------------------------------------
#
#  1.1: Write a big transaction to the db. One so large that it forces
#       the file to be created and the cache flushed to disk on COMMIT.
................................................................................

    CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
    WITH c(x) AS ( VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<100 ) 
    INSERT INTO t2 SELECT x, int2str(x) FROM c;
  COMMIT;

  PRAGMA lock_status;
} {main unlocked temp closed}

do_execsql_test 1.2 {
  UPDATE t1 SET b=int2str(2);
  SELECT b=int2str(2) FROM t1
} {1 1 1}

do_execsql_test 1.3 {







>
>
>







 







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix tempdb2

db close
sqlite3 db ""

set unlocked unlocked
if {$::TEMP_STORE>=2} { set unlocked unknown }

proc int2str {i} { string range [string repeat "$i." 450] 0 899 }
db func int2str int2str

#-------------------------------------------------------------------------
#
#  1.1: Write a big transaction to the db. One so large that it forces
#       the file to be created and the cache flushed to disk on COMMIT.
................................................................................

    CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
    WITH c(x) AS ( VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<100 ) 
    INSERT INTO t2 SELECT x, int2str(x) FROM c;
  COMMIT;

  PRAGMA lock_status;
} [list main $unlocked temp closed]

do_execsql_test 1.2 {
  UPDATE t1 SET b=int2str(2);
  SELECT b=int2str(2) FROM t1
} {1 1 1}

do_execsql_test 1.3 {

Changes to test/temptable2.test.

340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
    WITH x(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM x WHERE i<500 )
      INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM x;
  COMMIT;
  INSERT INTO t2 VALUES(3, 4);
}

ifcapable mmap {
  if {[permutation]!="journaltest"} {
    # The journaltest permutation does not support mmap, so this part of
    # the test is omitted.
    do_execsql_test 10.2 { PRAGMA mmap_size = 512000 } 512000
  }
}

do_execsql_test 10.3 { SELECT * FROM t2 } {1 2 3 4}
do_execsql_test 10.4 { PRAGMA integrity_check } ok

finish_test







|










340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
    WITH x(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM x WHERE i<500 )
      INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM x;
  COMMIT;
  INSERT INTO t2 VALUES(3, 4);
}

ifcapable mmap {
  if {[permutation]!="journaltest" && $::TEMP_STORE<2} {
    # The journaltest permutation does not support mmap, so this part of
    # the test is omitted.
    do_execsql_test 10.2 { PRAGMA mmap_size = 512000 } 512000
  }
}

do_execsql_test 10.3 { SELECT * FROM t2 } {1 2 3 4}
do_execsql_test 10.4 { PRAGMA integrity_check } ok

finish_test