SQLite

Check-in [d4ec61e254]
Login

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

Overview
Comment:Test that it is possible to drop a trigger while there are active statements belonging to the same connection.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d4ec61e2547200aa92a26c1f270682ed67edc241
User & Date: dan 2010-08-14 05:04:48.000
Context
2010-08-14
12:25
Add test cases to e_expr.test. (check-in: d8bbab78fa user: dan tags: trunk)
05:04
Test that it is possible to drop a trigger while there are active statements belonging to the same connection. (check-in: d4ec61e254 user: dan tags: trunk)
2010-08-13
18:41
Add tests to test file e_expr.test. (check-in: 3fd1059e25 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/triggerC.test.
911
912
913
914
915
916
917





















918
919
920
921
    CREATE TRIGGER tv2 INSTEAD OF INSERT ON v2 BEGIN
      INSERT INTO log VALUES(new.a, new.b);
    END;
    INSERT INTO v2 DEFAULT VALUES;
    SELECT a, b, a IS NULL, b IS NULL FROM log;
  }
} {{} {} 1 1}
























finish_test







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




911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
    CREATE TRIGGER tv2 INSTEAD OF INSERT ON v2 BEGIN
      INSERT INTO log VALUES(new.a, new.b);
    END;
    INSERT INTO v2 DEFAULT VALUES;
    SELECT a, b, a IS NULL, b IS NULL FROM log;
  }
} {{} {} 1 1}

do_test triggerC-12.1 {
  db close
  file delete -force test.db
  sqlite3 db test.db

  execsql {
    CREATE TABLE t1(a, b);
    INSERT INTO t1 VALUES(1, 2);
    INSERT INTO t1 VALUES(3, 4);
    INSERT INTO t1 VALUES(5, 6);
    CREATE TRIGGER tr1 AFTER INSERT ON t1 BEGIN SELECT 1 ; END ;
    SELECT count(*) FROM sqlite_master;
  }
} {2}
do_test triggerC-12.2 {
  db eval { SELECT * FROM t1 } {
    if {$a == 3} { execsql { DROP TRIGGER tr1 } }
  }
  execsql { SELECT count(*) FROM sqlite_master }
} {1}



finish_test