SQLite

Check-in [41806de5c8]
Login

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

Overview
Comment:Add a test to ensure that the fix in [b0c1ba655d] has worked.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 41806de5c88e924e306ca737192755c011517426
User & Date: dan 2012-12-04 05:24:21.277
Context
2012-12-04
11:03
Fix a harmless compiler warning. (check-in: 12693deba9 user: drh tags: trunk)
05:24
Add a test to ensure that the fix in [b0c1ba655d] has worked. (check-in: 41806de5c8 user: dan tags: trunk)
00:59
Improvements to the 'tcl' shell output mode. Escape doublequotes, set separator to space when mode is set, and skip separator after final column. (check-in: 487ba75313 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/vtab1.test.
1288
1289
1290
1291
1292
1293
1294








































1295
1296
} SQLITE_OK
do_test 19.2 {
  register_echo_module [sqlite3_connection_pointer db2]
} SQLITE_MISUSE
do_test 19.3 {
  db2 close
} {}









































finish_test







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
} SQLITE_OK
do_test 19.2 {
  register_echo_module [sqlite3_connection_pointer db2]
} SQLITE_MISUSE
do_test 19.3 {
  db2 close
} {}

#-------------------------------------------------------------------------
# Test that the bug fixed by [b0c1ba655d69] really is fixed.
#
do_execsql_test 20.1 {
  CREATE TABLE t7 (a, b);
  CREATE TABLE t8 (c, d);
  CREATE INDEX i2 ON t7(a);
  CREATE INDEX i3 ON t7(b);
  CREATE INDEX i4 ON t8(c);
  CREATE INDEX i5 ON t8(d);

  CREATE VIRTUAL TABLE t7v USING echo(t7);
  CREATE VIRTUAL TABLE t8v USING echo(t8);
}

do_test 20.2 {
  for {set i 0} {$i < 1000} {incr i} {
    db eval {INSERT INTO t7 VALUES($i, $i)}
    db eval {INSERT INTO t8 VALUES($i, $i)}
  }
} {}

do_execsql_test 20.3 {
  SELECT a, b FROM (
      SELECT a, b FROM t7 WHERE a=11 OR b=12
      UNION ALL
      SELECT c, d FROM t8 WHERE c=5 OR d=6
  )
  ORDER BY 1, 2;
} {5 5 6 6 11 11 12 12}

do_execsql_test 20.4 {
  SELECT a, b FROM (
      SELECT a, b FROM t7v WHERE a=11 OR b=12
      UNION ALL
      SELECT c, d FROM t8v WHERE c=5 OR d=6
  )
  ORDER BY 1, 2;
} {5 5 6 6 11 11 12 12}

finish_test