Chromium Code Reviews

Side by Side Diff: third_party/sqlite/sqlite-src-3070603/test/tkt3929.test

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
(Empty)
1 # 2009 June 23
2 #
3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
5 #
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
9 #
10 #***********************************************************************
11 #
12 # Tests to verify ticket #3929 is fixed.
13 #
14 # $Id: tkt3929.test,v 1.1 2009/06/23 11:53:09 danielk1977 Exp $
15
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
18 ifcapable {!trigger} {
19 finish_test
20 return
21 }
22
23 do_test tkt3929-1.0 {
24 execsql {
25 PRAGMA page_size = 1024;
26 CREATE TABLE t1(a, b);
27 CREATE INDEX i1 ON t1(a, b);
28 CREATE TRIGGER t1_t1 AFTER INSERT ON t1 BEGIN
29 UPDATE t1 SET b = 'value: ' || a WHERE t1.rowid = new.rowid;
30 END;
31 }
32 } {}
33
34 do_test tkt3929-1.1 {
35 execsql {
36 INSERT INTO t1(a) VALUES(1);
37 INSERT INTO t1(a) VALUES(2);
38 SELECT * FROM t1;
39 }
40 } {1 {value: 1} 2 {value: 2}}
41
42 # Before it was fixed, the following provoked the bug, causing either an
43 # assertion failure or a "database is malformed" error.
44 #
45 do_test tkt3930-1.2 {
46 for {set i 3} {$i < 100} {incr i} {
47 execsql { INSERT INTO t1(a) VALUES($i) }
48 }
49 } {}
50
51 integrity_check tkt3930-1.3
52 finish_test
53
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3070603/test/tkt3922.test ('k') | third_party/sqlite/sqlite-src-3070603/test/tkt3935.test » ('j') | no next file with comments »

Powered by Google App Engine