/ Check-in [58069252]
Login

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

Overview
Comment:Update triggerC.test to match the change to the way the trigger-recursion limit is handled.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5806925283b889867567c4ad92518bad000e9d9d
User & Date: dan 2009-10-08 06:24:41
Context
2009-10-08
11:57
Add tests to test/e_fkey.test. check-in: 533703d7 user: dan tags: trunk
06:24
Update triggerC.test to match the change to the way the trigger-recursion limit is handled. check-in: 58069252 user: dan tags: trunk
01:43
Fix a segfault that can occur following an OOM fault while renaming a table holding foreign key constraints. check-in: 33973814 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to test/triggerC.test.

300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
...
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
} {1 {too many levels of trigger recursion}}
do_test triggerC-3.2.2 {
  db eval {SELECT * FROM t3b}
} {}

do_test triggerC-3.3.1 {
  catchsql {
    INSERT INTO t3b VALUES(1000);
  }
} {0 {}}
do_test triggerC-3.3.2 {
  db eval {SELECT count(*), max(x), min(x) FROM t3b}
} {1001 2000 1000}

do_test triggerC-3.4.1 {
  catchsql {
    DELETE FROM t3b;
    INSERT INTO t3b VALUES(999);
  }
} {1 {too many levels of trigger recursion}}
................................................................................
do_test triggerC-3.4.2 {
  db eval {SELECT count(*), max(x), min(x) FROM t3b}
} {0 {} {}}

do_test triggerC-3.5.1 {
  sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 100
  catchsql {
    INSERT INTO t3b VALUES(1900);
  }
} {0 {}}
do_test triggerC-3.5.2 {
  db eval {SELECT count(*), max(x), min(x) FROM t3b}
} {101 2000 1900}

do_test triggerC-3.5.3 {
  catchsql {
    DELETE FROM t3b;
    INSERT INTO t3b VALUES(1899);
  }
} {1 {too many levels of trigger recursion}}
do_test triggerC-3.5.4 {
  db eval {SELECT count(*), max(x), min(x) FROM t3b}
} {0 {} {}}

do_test triggerC-3.6.1 {
  sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 1
  catchsql {
    INSERT INTO t3b VALUES(1999);
  }
} {0 {}}
do_test triggerC-3.6.2 {
  db eval {SELECT count(*), max(x), min(x) FROM t3b}
} {2 2000 1999}

do_test triggerC-3.6.3 {
  catchsql {
    DELETE FROM t3b;
    INSERT INTO t3b VALUES(1998);
  }
} {1 {too many levels of trigger recursion}}
do_test triggerC-3.6.4 {
  db eval {SELECT count(*), max(x), min(x) FROM t3b}
} {0 {} {}}
sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 1000
      







|




|







 







|




|




|









|




|




|







300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
...
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
} {1 {too many levels of trigger recursion}}
do_test triggerC-3.2.2 {
  db eval {SELECT * FROM t3b}
} {}

do_test triggerC-3.3.1 {
  catchsql {
    INSERT INTO t3b VALUES(1001);
  }
} {0 {}}
do_test triggerC-3.3.2 {
  db eval {SELECT count(*), max(x), min(x) FROM t3b}
} {1000 2000 1001}

do_test triggerC-3.4.1 {
  catchsql {
    DELETE FROM t3b;
    INSERT INTO t3b VALUES(999);
  }
} {1 {too many levels of trigger recursion}}
................................................................................
do_test triggerC-3.4.2 {
  db eval {SELECT count(*), max(x), min(x) FROM t3b}
} {0 {} {}}

do_test triggerC-3.5.1 {
  sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 100
  catchsql {
    INSERT INTO t3b VALUES(1901);
  }
} {0 {}}
do_test triggerC-3.5.2 {
  db eval {SELECT count(*), max(x), min(x) FROM t3b}
} {100 2000 1901}

do_test triggerC-3.5.3 {
  catchsql {
    DELETE FROM t3b;
    INSERT INTO t3b VALUES(1900);
  }
} {1 {too many levels of trigger recursion}}
do_test triggerC-3.5.4 {
  db eval {SELECT count(*), max(x), min(x) FROM t3b}
} {0 {} {}}

do_test triggerC-3.6.1 {
  sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 1
  catchsql {
    INSERT INTO t3b VALUES(2000);
  }
} {0 {}}
do_test triggerC-3.6.2 {
  db eval {SELECT count(*), max(x), min(x) FROM t3b}
} {1 2000 2000}

do_test triggerC-3.6.3 {
  catchsql {
    DELETE FROM t3b;
    INSERT INTO t3b VALUES(1999);
  }
} {1 {too many levels of trigger recursion}}
do_test triggerC-3.6.4 {
  db eval {SELECT count(*), max(x), min(x) FROM t3b}
} {0 {} {}}
sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 1000