SQLite

Check-in [94a23f9933]
Login

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

Overview
Comment:Further adjustment to rowhash.test to account for rowid collisions. (CVS 6560)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 94a23f993381412c7533878d44faa2f8e47e58ce
User & Date: danielk1977 2009-04-28 15:48:09.000
Context
2009-04-28
16:35
Remove an unused function declaration from hash.h. (CVS 6561) (check-in: fcf70bb8b8 user: drh tags: trunk)
15:48
Further adjustment to rowhash.test to account for rowid collisions. (CVS 6560) (check-in: 94a23f9933 user: danielk1977 tags: trunk)
15:43
Simplifications to the symbol table implementation in hash.c. For very small symbol tables (less than 10 entries) a simple linked list is used instead of a hash table. Number of hash table buckets is limited to prevent large allocations. (CVS 6559) (check-in: 5c737835de user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/rowhash.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.  The
# focus of this file is the code in rowhash.c.
#
# $Id: rowhash.test,v 1.3 2009/04/23 18:42:05 shane Exp $

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

do_test rowhash-1.1 {
  execsql {
    CREATE TABLE t1(id INTEGER PRIMARY KEY, a, b, c);







|







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.  The
# focus of this file is the code in rowhash.c.
#
# $Id: rowhash.test,v 1.4 2009/04/28 15:48:09 danielk1977 Exp $

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

do_test rowhash-1.1 {
  execsql {
    CREATE TABLE t1(id INTEGER PRIMARY KEY, a, b, c);
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
      execsql { INSERT OR IGNORE INTO t1 VALUES($key, 'a', 'b', 'c') }
    }
  }
  do_test $name {
    lsort -integer [execsql {
      SELECT id FROM t1 WHERE a = 'a' OR b = 'b' OR c = 'c';
    }]
  } [lsort -integer $lKey]
}

do_keyset_test rowhash-2.1 {1 2 3}
do_keyset_test rowhash-2.2 {0 1 2 3}
do_keyset_test rowhash-2.3 {62 125 188}
if {[working_64bit_int]} {
  expr srand(1)







|







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
      execsql { INSERT OR IGNORE INTO t1 VALUES($key, 'a', 'b', 'c') }
    }
  }
  do_test $name {
    lsort -integer [execsql {
      SELECT id FROM t1 WHERE a = 'a' OR b = 'b' OR c = 'c';
    }]
  } [lsort -integer -unique $lKey]
}

do_keyset_test rowhash-2.1 {1 2 3}
do_keyset_test rowhash-2.2 {0 1 2 3}
do_keyset_test rowhash-2.3 {62 125 188}
if {[working_64bit_int]} {
  expr srand(1)