Home
last modified time | relevance | path

Searched refs:UPDATE (Results 1 – 25 of 288) sorted by relevance

12345678910>>...12

/external/chromium_org/third_party/sqlite/src/test/
De_update.test21 # e_update-1.*: Test statements describing the workings of UPDATE statements.
23 # e_update-2.*: Test the restrictions on the UPDATE statement syntax that
27 # be used with UPDATE when SQLite is compiled with
55 1 "UPDATE t1 SET a=10" {}
56 2 "UPDATE t1 SET a=10, b=5" {}
57 3 "UPDATE t1 SET a=10 WHERE b=5" {}
58 4 "UPDATE t1 SET b=5,a=10 WHERE 1" {}
59 5 "UPDATE main.t1 SET a=10" {}
60 6 "UPDATE main.t1 SET a=10, b=5" {}
61 7 "UPDATE main.t1 SET a=10 WHERE b=5" {}
[all …]
Dupdate.test12 # focus of this file is testing the UPDATE statement.
22 set v [catch {execsql {UPDATE test1 SET f2=5 WHERE f1<1}} msg]
30 {execsql {UPDATE sqlite_master SET name='xyz' WHERE name='123'}} msg]
48 set v [catch {execsql {UPDATE test1 SET f1=f3*2 WHERE f2==32}} msg]
52 set v [catch {execsql {UPDATE test1 SET f1=test2.f1*2 WHERE f2==32}} msg]
56 set v [catch {execsql {UPDATE test1 SET f3=f1*2 WHERE f2==32}} msg]
63 execsql {UPDATE test1 SET f2=f2*3}
82 execsql {UPDATE test1 SET f2=f2/3 WHERE f1<=5}
88 execsql {UPDATE test1 SET f2=f2/3 WHERE f1>5}
97 execsql {UPDATE test1 SET F2=f1, F1=f2}
[all …]
Dbigrow.test72 UPDATE t1 SET a=b, b=a;
105 UPDATE t1 SET a=b, b=a
111 UPDATE t1 SET a=b, b=a
135 UPDATE t1 SET b=b||b;
136 UPDATE t1 SET b=b||b;
137 UPDATE t1 SET b=b||b;
143 execsql "UPDATE t1 SET b=b||'$i'"
159 UPDATE t1 SET b=b||b;
160 UPDATE t1 SET b=b||b;
161 UPDATE t1 SET b=b||b;
[all …]
Dtrigger9.test21 # trigger9-2.* - Test that for NEW.* records populated by UPDATE
99 CREATE TRIGGER trig1 BEFORE UPDATE ON t1 BEGIN
102 UPDATE t1 SET y = '';
107 has_rowdata {UPDATE t1 SET y = ''}
114 CREATE TRIGGER trig1 BEFORE UPDATE ON t1 BEGIN
117 UPDATE t1 SET y = '';
122 has_rowdata {UPDATE t1 SET y = ''}
129 CREATE TRIGGER trig1 BEFORE UPDATE ON t1 WHEN old.x>='2' BEGIN
132 UPDATE t1 SET y = '';
137 has_rowdata {UPDATE t1 SET y = ''}
[all …]
Dtrigger7.test46 # When the UPDATE OF syntax is used, no code is generated for triggers
52 CREATE TRIGGER r1 AFTER UPDATE OF x ON t1 BEGIN
55 CREATE TRIGGER r2 AFTER UPDATE OF y ON t1 BEGIN
59 set txt [db eval {EXPLAIN UPDATE t1 SET x=5}]
63 set txt [db eval {EXPLAIN UPDATE t1 SET x=5}]
67 set txt [db eval {EXPLAIN UPDATE t1 SET y=5}]
71 set txt [db eval {EXPLAIN UPDATE t1 SET y=5}]
75 set txt [db eval {EXPLAIN UPDATE t1 SET rowid=5}]
79 set txt [db eval {EXPLAIN UPDATE t1 SET rowid=5}]
92 CREATE TRIGGER t2r3 AFTER UPDATE ON t2 BEGIN SELECT 1; END;
[all …]
Dshared4.test175 UPDATE t1 SET a=a+1000;
176 UPDATE t2 SET b=b+2000;
177 UPDATE t3 SET c=c+3000;
178 UPDATE t4 SET d=d+4000;
181 UPDATE t1 SET a=a+10000;
182 UPDATE t2 SET b=b+20000;
183 UPDATE t3 SET c=c+30000;
184 UPDATE t4 SET d=d+40000;
187 UPDATE t1 SET a=a+100000;
188 UPDATE t2 SET b=b+200000;
[all …]
Dfkey_malloc.test26 CREATE TABLE t2(x REFERENCES t1 ON UPDATE CASCADE ON DELETE CASCADE);
30 UPDATE t1 SET a = 'bbb';
44 UPDATE t1 SET a = 'c';
47 UPDATE t2 SET x = 'c';
54 CREATE TABLE t2(y DEFAULT 14 REFERENCES t1(x) ON UPDATE SET DEFAULT);
55 CREATE TABLE t3(y REFERENCES t1 ON UPDATE SET NULL);
60 UPDATE t1 SET x = 14;
97 CREATE TABLE t2(a, b, FOREIGN KEY(a, b) REFERENCES t1 ON UPDATE CASCADE);
101 UPDATE t1 SET x = 5;
108 y REFERENCES t1 ON DELETE RESTRICT ON UPDATE SET DEFAULT
[all …]
Dtrigger2.test16 # trigger2-1.1.*: ON UPDATE trigger execution model.
22 # trigger program can correctly execute INSERT, UPDATE, DELETE * SELECT
26 # This tests that conditional triggers (ie. UPDATE OF triggers and triggers
29 # trigger2-3.1: UPDATE OF triggers
45 # trigger2-6.2[a-f]: UPDATE statements
97 CREATE TRIGGER before_update_row BEFORE UPDATE ON tbl FOR EACH ROW
106 CREATE TRIGGER after_update_row AFTER UPDATE ON tbl FOR EACH ROW
115 CREATE TRIGGER conditional_update_row AFTER UPDATE ON tbl FOR EACH ROW
129 UPDATE tbl SET a = a * 10, b = b * 10;
227 {UPDATE tbl SET b = old.b;}
[all …]
Dwherelimit.test13 # of UPDATE and DELETE statements.
49 catchsql {UPDATE t1 SET y=1 WHERE x=1 ORDER BY x}
50 } {1 {ORDER BY without LIMIT on UPDATE}}
57 catchsql {UPDATE t1 AS a SET y=1 WHERE x=1}
65 catchsql {UPDATE t1 SET y=1 WHERE x=1 OFFSET 2}
216 execsql {UPDATE t1 SET y=1 WHERE x=1}
221 execsql {UPDATE t1 SET y=1 WHERE x=1 LIMIT 5}
226 execsql {UPDATE t1 SET y=2 WHERE x=2 ORDER BY x LIMIT 5}
232 execsql {UPDATE t1 SET y=2 WHERE x=2 ORDER BY x LIMIT 5 OFFSET 2}
237 execsql {UPDATE t1 SET y=2 WHERE x=2 ORDER BY x LIMIT 5 OFFSET -2}
[all …]
Dconflict.test281 # cmd An UPDATE command to execute against table t1
292 1 {} UPDATE 1 {6 7 8 9} 1 0 1
293 2 REPLACE UPDATE 0 {7 6 9} 1 0 0
294 3 IGNORE UPDATE 0 {6 7 3 9} 1 0 0
295 4 FAIL UPDATE 1 {6 7 3 4} 1 0 0
296 5 ABORT UPDATE 1 {1 2 3 4} 1 0 1
297 6 ROLLBACK UPDATE 1 {1 2 3 4} 0 0 0
298 7 REPLACE {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0
299 8 IGNORE {UPDATE OR REPLACE} 0 {7 6 9} 1 0 0
300 9 FAIL {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0
[all …]
DtriggerC.test64 CREATE TRIGGER trig3 BEFORE UPDATE ON t1 BEGIN
67 CREATE TRIGGER trig4 AFTER UPDATE ON t1 BEGIN
91 UPDATE t1 SET a = 'a';
127 CREATE TRIGGER au_tbl AFTER UPDATE ON t5 BEGIN
128 UPDATE OR IGNORE t5 SET a = new.a, c = 10;
133 catchsql { UPDATE OR REPLACE t5 SET a = 4 WHERE a = 1 }
142 UPDATE t6 SET a=a;
152 CREATE TRIGGER t1r1 AFTER UPDATE ON t1 BEGIN UPDATE cnt SET n=n+1; END;
159 catchsql { UPDATE OR ROLLBACK t1 SET a=100 }
383 # For an UPDATE statement, for each row to be deleted:
[all …]
Dcheck.test82 UPDATE t1 SET x=2 WHERE x==3;
88 UPDATE t1 SET x=7 WHERE x==2
98 UPDATE t1 SET x=5 WHERE x==2
108 UPDATE t1 SET x=4, y=11 WHERE x==2
238 UPDATE t4 SET x=4, y=3;
244 UPDATE t4 SET x=12, y=2;
250 UPDATE t4 SET x=12, y=-22;
256 UPDATE t4 SET x=0, y=1;
267 UPDATE t4 SET x=0, y=1;
274 UPDATE t4 SET x=0, y=2;
[all …]
Dfkey2.test59 # an UPDATE or INSERT statement.
112 1.6 "UPDATE t2 SET c=2 WHERE d=4" {1 {foreign key constraint failed}}
113 1.7 "UPDATE t2 SET c=1 WHERE d=4" {0 {}}
114 1.9 "UPDATE t2 SET c=1 WHERE d=4" {0 {}}
115 1.10 "UPDATE t2 SET c=NULL WHERE d=4" {0 {}}
117 1.12 "UPDATE t1 SET a = 2" {1 {foreign key constraint failed}}
118 1.13 "UPDATE t1 SET a = 1" {0 {}}
129 4.6 "UPDATE t8 SET c=2 WHERE d=4" {1 {foreign key constraint failed}}
130 4.7 "UPDATE t8 SET c=1 WHERE d=4" {0 {}}
131 4.9 "UPDATE t8 SET c=1 WHERE d=4" {0 {}}
[all …]
DtriggerA.test13 # when one tries to UPDATE or DELETE from the view. Does the WHERE
14 # clause of the UPDATE or DELETE statement get passed down correctly
84 # Create INSTEAD OF triggers on the views. Run UPDATE and DELETE statements
100 CREATE TRIGGER r1u INSTEAD OF UPDATE ON v1 BEGIN
103 UPDATE v1 SET y=y||'-extra' WHERE x BETWEEN 3 AND 5;
122 CREATE TRIGGER r2u INSTEAD OF UPDATE ON v2 BEGIN
125 UPDATE v2 SET y=y||'-extra' WHERE x BETWEEN 3 AND 5;
144 CREATE TRIGGER r3u INSTEAD OF UPDATE ON v3 BEGIN
147 UPDATE v3 SET c1 = c1 || '-extra' WHERE c1 BETWEEN '8' and 'eight';
166 CREATE TRIGGER r4u INSTEAD OF UPDATE ON v4 BEGIN
[all …]
Dtkt3992.test35 UPDATE parameters1 SET mountcnt = mountcnt + 1;
42 UPDATE parameters2 SET mountcnt = mountcnt + 1;
58 UPDATE t1 SET a = 'one';
70 CREATE TRIGGER tr2 BEFORE UPDATE ON t2 BEGIN
74 UPDATE t2 SET a = 'I';
Dlock.test57 execsql {UPDATE t1 SET a=b, b=a} db2
65 execsql {UPDATE t1 SET a = 0 WHERE 0}
104 # You cannot UPDATE a table from within the callback of a SELECT
112 # set r [catch {db eval {UPDATE t1 SET a=b, b=a}} msg]
118 # But you can UPDATE a different table from the one that is used in
123 set r [catch {db eval {UPDATE t2 SET x=y, y=x}} msg]
165 execsql {UPDATE t1 SET a = 0 WHERE 0}
167 set r [catch {execsql {UPDATE t1 SET a = 0 WHERE 0} db2} msg]
190 set r [catch {execsql {UPDATE t1 SET a=b, b=a} db2} msg]
198 set r [catch {execsql {UPDATE t1 SET a=b, b=a} db2} msg]
[all …]
Dmemdb.test214 # cmd An UPDATE command to execute against table t1
220 1 {} {} UPDATE 1 {6 7 8 9} 1
221 2 REPLACE {} UPDATE 0 {7 6 9} 1
222 3 IGNORE {} UPDATE 0 {6 7 3 9} 1
223 4 FAIL {} UPDATE 1 {6 7 3 4} 1
224 5 ABORT {} UPDATE 1 {1 2 3 4} 1
225 6 ROLLBACK {} UPDATE 1 {1 2 3 4} 0
226 7 REPLACE {} {UPDATE OR IGNORE} 0 {6 7 3 9} 1
227 8 IGNORE {} {UPDATE OR REPLACE} 0 {7 6 9} 1
228 9 FAIL {} {UPDATE OR IGNORE} 0 {6 7 3 9} 1
[all …]
Dmain.test104 CREATE TRIGGER xyz AFTER DELETE abc BEGIN UPDATE pqr;
109 EXPLAIN CREATE TRIGGER xyz AFTER DELETE abc BEGIN UPDATE pqr;
114 EXPLAIN QUERY PLAN CREATE TRIGGER xyz AFTER DELETE abc BEGIN UPDATE pqr;
119 CREATE TRIGGER xyz AFTER DELETE abc BEGIN UPDATE pqr; END;
125 UPDATE pqr;
132 UPDATE pqr;
159 UPDATE pqr;
165 UPDATE cantor SET a=[;end;];;;
172 UPDATE pqr SET a=5;
179 UPDATE pqr SET a=5;
[all …]
Dfts3d.test168 # NOTE(shess): Since there's no transaction, each of the INSERT/UPDATE
178 UPDATE t1 SET c = 'This is a test one' WHERE rowid = 1;
179 UPDATE t1 SET c = 'That was a test one' WHERE rowid = 2;
180 UPDATE t1 SET c = 'This is a test one' WHERE rowid = 3;
182 UPDATE t1 SET c = 'This is a test two' WHERE rowid = 1;
183 UPDATE t1 SET c = 'That was a test two' WHERE rowid = 2;
184 UPDATE t1 SET c = 'This is a test two' WHERE rowid = 3;
186 UPDATE t1 SET c = 'This is a test three' WHERE rowid = 1;
187 UPDATE t1 SET c = 'That was a test three' WHERE rowid = 2;
188 UPDATE t1 SET c = 'This is a test three' WHERE rowid = 3;
[all …]
DtriggerB.test30 CREATE TEMP TRIGGER tx INSTEAD OF UPDATE OF y ON vx
32 UPDATE x SET y = new.y WHERE x = new.x;
39 UPDATE vx SET y = yy;
58 CREATE TRIGGER tz AFTER UPDATE ON x BEGIN
61 UPDATE x SET y=y+1;
70 CREATE TRIGGER r1t2 AFTER UPDATE ON t2 BEGIN
75 UPDATE t2 SET a=a+10;
122 CREATE TRIGGER t3c$i AFTER UPDATE ON t3
136 UPDATE t3 SET c$i='b$i';
De_fkey.test43 CREATE TABLE c(j REFERENCES p ON UPDATE CASCADE);
46 UPDATE p SET i = 'world';
79 CREATE TABLE c(j REFERENCES p ON UPDATE CASCADE);
82 UPDATE p SET i = 'world';
109 catchsql { CREATE TABLE c(j REFERENCES p ON UPDATE CASCADE) }
146 CREATE TABLE c(j REFERENCES p ON UPDATE CASCADE);
149 UPDATE p SET i = 'world';
160 UPDATE p SET i = 'world';
313 catchsql { UPDATE track SET trackartist = 5 WHERE trackid = 1 }
318 UPDATE track SET trackartist = 5 WHERE trackid = 1;
[all …]
Dhook.test120 # for INSERT, DELETE and UPDATE statements, including DELETE
147 UPDATE t1 SET b = '' WHERE a = 1 OR a = 3;
154 UPDATE main t1 1 \
155 UPDATE main t1 3 \
188 UPDATE t2 SET d = d || ' via trigger' WHERE new.a = c;
202 UPDATE main t2 1 \
206 UPDATE main t2 2 \
225 UPDATE t3 SET b = 'two or so' WHERE a = 2;
232 UPDATE aux t3 2 \
251 UPDATE t1 SET b = '';
[all …]
Dnotnull.test189 UPDATE t1 SET a=null;
197 UPDATE OR REPLACE t1 SET a=null;
205 UPDATE OR IGNORE t1 SET a=null;
213 UPDATE OR ABORT t1 SET a=null;
221 UPDATE t1 SET b=null;
229 UPDATE OR REPLACE t1 SET b=null, d=e, e=d;
237 UPDATE OR IGNORE t1 SET b=null, d=e, e=d;
245 UPDATE t1 SET c=null, d=e, e=d;
253 UPDATE t1 SET d=null, a=b, b=a;
261 UPDATE t1 SET e=null, a=b, b=a;
[all …]
Dfts2q.test208 # NOTE(shess): Since there's no transaction, each of the INSERT/UPDATE
218 UPDATE t1 SET c = 'This is a test one' WHERE rowid = 1;
219 UPDATE t1 SET c = 'That was a test one' WHERE rowid = 2;
220 UPDATE t1 SET c = 'This is a test one' WHERE rowid = 3;
222 UPDATE t1 SET c = 'This is a test two' WHERE rowid = 1;
223 UPDATE t1 SET c = 'That was a test two' WHERE rowid = 2;
224 UPDATE t1 SET c = 'This is a test two' WHERE rowid = 3;
226 UPDATE t1 SET c = 'This is a test three' WHERE rowid = 1;
227 UPDATE t1 SET c = 'That was a test three' WHERE rowid = 2;
228 UPDATE t1 SET c = 'This is a test three' WHERE rowid = 3;
[all …]
/external/chromium_org/third_party/sqlite/src/tool/
Dgenfkey.test54 catchsql { UPDATE t2 SET e = 5 WHERE e IS NULL }
57 execsql { UPDATE t2 SET e = 1 WHERE e IS NULL }
60 execsql { UPDATE t2 SET e = NULL WHERE f = 3 }
63 catchsql { UPDATE t1 SET a = 10 }
66 catchsql { UPDATE t1 SET a = NULL }
72 execsql { UPDATE t2 SET e = NULL }
76 UPDATE t1 SET a = 10 ;
102 catchsql { UPDATE t1 SET b = 10}
105 execsql { UPDATE t1 SET a = 10}
108 catchsql { UPDATE t3 SET h = 'hello' WHERE i = 3}
[all …]

12345678910>>...12