SQLite

Check-in [5830c557f7]
Login

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

Overview
Comment:Fix the fkey-7.1 test so that it sorts its answer and hence always gives the same answer.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5830c557f7ed048056e2faeb82a8705ee7ecfdd7
User & Date: drh 2015-01-01 14:06:24.026
Context
2015-01-01
14:13
Fix two test cases in memsubsys1 so that they work with the mmap permutation. (check-in: 66269d0d8e user: drh tags: trunk)
14:06
Fix the fkey-7.1 test so that it sorts its answer and hence always gives the same answer. (check-in: 5830c557f7 user: drh tags: trunk)
2014-12-31
20:35
Fix to releasetest.tcl: When doing the secondary _debug runs, convert "fulltest" to just "test". (check-in: ec264bdee5 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/fkey5.test.
248
249
250
251
252
253
254

255
256
257
258
259


260
261


262
263
264
265
266
267
268
do_test fkey5-6.5 {
  db eval {
    PRAGMA foreign_key_check(c12);
  }
} {c12 1 p4 0 c12 3 p4 0 c12 6 p4 0}

do_test fkey5-7.1 {

  db eval {
    INSERT OR IGNORE INTO c13 SELECT * FROM c12;
    INSERT OR IGNORE INTO C14 SELECT * FROM c12;
    DELETE FROM c12;
    PRAGMA foreign_key_check;


  }
} {c14 1 p4 0 c14 3 p4 0 c14 6 p4 0 c13 1 p3 0 c13 2 p3 0 c13 3 p3 0 c13 4 p3 0 c13 5 p3 0 c13 6 p3 0}


do_test fkey5-7.2 {
  db eval {
    PRAGMA foreign_key_check(c14);
  }
} {c14 1 p4 0 c14 3 p4 0 c14 6 p4 0}
do_test fkey5-7.3 {
  db eval {







>





>
>

<
>
>







248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263

264
265
266
267
268
269
270
271
272
do_test fkey5-6.5 {
  db eval {
    PRAGMA foreign_key_check(c12);
  }
} {c12 1 p4 0 c12 3 p4 0 c12 6 p4 0}

do_test fkey5-7.1 {
  set res {}
  db eval {
    INSERT OR IGNORE INTO c13 SELECT * FROM c12;
    INSERT OR IGNORE INTO C14 SELECT * FROM c12;
    DELETE FROM c12;
    PRAGMA foreign_key_check;
  } {
    lappend res [list $table $rowid $fkid $parent]
  }

  lsort $res
} {{c13 1 0 p3} {c13 2 0 p3} {c13 3 0 p3} {c13 4 0 p3} {c13 5 0 p3} {c13 6 0 p3} {c14 1 0 p4} {c14 3 0 p4} {c14 6 0 p4}}
do_test fkey5-7.2 {
  db eval {
    PRAGMA foreign_key_check(c14);
  }
} {c14 1 p4 0 c14 3 p4 0 c14 6 p4 0}
do_test fkey5-7.3 {
  db eval {