/ Check-in [de3f7187]
Login

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

Overview
Comment:Fix a harmless compiler warning in tclsqlite.c for MSVC x64. Fix a test case associated with the FTS4 merge feature.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: de3f7187eb2ff24683a1854ae523e7d30c290893
User & Date: drh 2012-04-19 17:19:51
Context
2012-04-19
18:04
Fix harmless compiler warnings on x64 MSVC, mostly in test code, but also in tclsqlite.c and in the FTS4 module. check-in: 3281972e user: drh tags: trunk
17:19
Fix a harmless compiler warning in tclsqlite.c for MSVC x64. Fix a test case associated with the FTS4 merge feature. check-in: de3f7187 user: drh tags: trunk
15:49
Fix harmless compiler warnings (unused parameter warnings) in the aggregate query analyzer. check-in: 2d435620 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/tclsqlite.c.

1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
    assert( pPreStmt==0 );
    nVar = sqlite3_bind_parameter_count(pStmt);
    nByte = sizeof(SqlPreparedStmt) + nVar*sizeof(Tcl_Obj *);
    pPreStmt = (SqlPreparedStmt*)Tcl_Alloc(nByte);
    memset(pPreStmt, 0, nByte);

    pPreStmt->pStmt = pStmt;
    pPreStmt->nSql = (*pzOut - zSql);
    pPreStmt->zSql = sqlite3_sql(pStmt);
    pPreStmt->apParm = (Tcl_Obj **)&pPreStmt[1];
#ifdef SQLITE_TEST
    if( pPreStmt->zSql==0 ){
      char *zCopy = Tcl_Alloc(pPreStmt->nSql + 1);
      memcpy(zCopy, zSql, pPreStmt->nSql);
      zCopy[pPreStmt->nSql] = '\0';







|







1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
    assert( pPreStmt==0 );
    nVar = sqlite3_bind_parameter_count(pStmt);
    nByte = sizeof(SqlPreparedStmt) + nVar*sizeof(Tcl_Obj *);
    pPreStmt = (SqlPreparedStmt*)Tcl_Alloc(nByte);
    memset(pPreStmt, 0, nByte);

    pPreStmt->pStmt = pStmt;
    pPreStmt->nSql = (int)(*pzOut - zSql);
    pPreStmt->zSql = sqlite3_sql(pStmt);
    pPreStmt->apParm = (Tcl_Obj **)&pPreStmt[1];
#ifdef SQLITE_TEST
    if( pPreStmt->zSql==0 ){
      char *zCopy = Tcl_Alloc(pPreStmt->nSql + 1);
      memcpy(zCopy, zSql, pPreStmt->nSql);
      zCopy[pPreStmt->nSql] = '\0';

Changes to test/fts4merge3.test.

40
41
42
43
44
45
46

47


48
49
50
51
52
53
54
    set msg "this takes around 12 seconds"
    do_test "1.1 ($msg)" { fts3_build_db_2 20000 } {}

    # Run some queries on it, using the old and new versions.
    do_test 1.2 { sql1 "SELECT docid FROM t2 WHERE t2 MATCH 'abc'" } {1485}
    do_test 1.3 { sql2 "SELECT docid FROM t2 WHERE t2 MATCH 'abc'" } {1485}


    do_test 1.4 { sql2 "PRAGMA page_count" } {1286}


    do_test 1.5 { sql2 { 
      SELECT level, count(*) FROM t2_segdir GROUP BY level ORDER BY 1
    } } [list 0 15    1 1     2 14    3 4]

    # Run some incr-merge operations on the db.
    for {set i 0} {$i<10} {incr i} {
      do_test 1.6.$i.1 { sql1 { INSERT INTO t2(t2) VALUES('merge=2,2') } } {}







>
|
>
>







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    set msg "this takes around 12 seconds"
    do_test "1.1 ($msg)" { fts3_build_db_2 20000 } {}

    # Run some queries on it, using the old and new versions.
    do_test 1.2 { sql1 "SELECT docid FROM t2 WHERE t2 MATCH 'abc'" } {1485}
    do_test 1.3 { sql2 "SELECT docid FROM t2 WHERE t2 MATCH 'abc'" } {1485}

    do_test 1.4 {
      set x [sql2 "PRAGMA page_count"]
      expr {$x>=1284 && $x<=1286}
    } {1}
    do_test 1.5 { sql2 { 
      SELECT level, count(*) FROM t2_segdir GROUP BY level ORDER BY 1
    } } [list 0 15    1 1     2 14    3 4]

    # Run some incr-merge operations on the db.
    for {set i 0} {$i<10} {incr i} {
      do_test 1.6.$i.1 { sql1 { INSERT INTO t2(t2) VALUES('merge=2,2') } } {}