Home
last modified time | relevance | path

Searched refs:random (Results 1 – 25 of 83) sorted by relevance

1234

/sqlite-3.40.0/ext/rbu/
H A Drbuexlock.test29 INSERT INTO data_t1 VALUES(10, random(), random(), 0);
30 INSERT INTO data_t1 VALUES(20, random(), random(), 0);
31 INSERT INTO data_t1 VALUES(30, random(), random(), 0);
32 INSERT INTO data_t1 VALUES(40, random(), random(), 0);
33 INSERT INTO data_t1 VALUES(50, random(), random(), 0);
34 INSERT INTO data_t1 VALUES(60, random(), random(), 0);
35 INSERT INTO data_t1 VALUES(70, random(), random(), 0);
36 INSERT INTO data_t1 VALUES(80, random(), random(), 0);
/sqlite-3.40.0/test/
H A Dspeed2.test21 # Set a uniform random seed
172 # 100000 random SELECTs against rowid.
181 # 100000 random SELECTs against a unique indexed column.
213 # 100000 random SELECTs against rowid.
222 # 100000 random SELECTs against a unique indexed column.
310 # Select 20000 rows from the table at random.
313 SELECT rowid FROM t1 ORDER BY random() LIMIT 20000
316 # Delete 20000 random rows from the table.
318 speed_trial speed2-random-del1 20000 row {
327 # Delete 20000 more rows at random from the table.
[all …]
H A Dorderby9.test42 # If random() is only evaluated once and then reused for each row, then
43 # the output should appear in sorted order. If random() is evaluated
45 # order will be random.
46 db eval {SELECT random() AS y FROM t1 ORDER BY 1;} {lappend l1 $y}
52 db eval {SELECT random() AS y FROM t1 ORDER BY random();} {lappend l1 $y}
58 db eval {SELECT random() AS y FROM t1 ORDER BY +random();} {lappend l1 $y}
H A Dsavepoint4.test63 DELETE FROM t1 WHERE random()%2==0;
67 UPDATE t1 SET x = randstr(10, 400) WHERE random()%10;
81 DELETE FROM t1 WHERE random()%10==0;
82 INSERT INTO t1 SELECT randstr(10,10)||x FROM t1 WHERE random()%9==0;
122 DELETE FROM t1 WHERE (random()%10)==0;
124 DELETE FROM t1 WHERE (random()%10)==0;
126 DELETE FROM t1 WHERE (random()%10)==0;
163 DELETE FROM t1 WHERE random()%10==0;
164 INSERT INTO t1 SELECT randstr(10,10)||x FROM t1 WHERE random()%9==0;
H A Dspeed1p.test29 # Set a uniform random seed
181 # 100000 random SELECTs against rowid.
197 # 100000 random SELECTs against a unique indexed column.
315 # Select 20000 rows from the table at random.
318 SELECT rowid FROM t1 ORDER BY random() LIMIT 20000
321 # Delete 20000 random rows from the table.
323 speed_trial speed1p-random-del1 20000 row {
325 (SELECT rowid FROM t1 ORDER BY random() LIMIT 20000)
331 # Delete 20000 more rows at random from the table.
333 speed_trial speed1p-random-del2 20000 row {
[all …]
H A Dspeed1.test25 # Set a uniform random seed
158 # 100000 random SELECTs against rowid.
169 # 100000 random SELECTs against a unique indexed column.
265 # Select 20000 rows from the table at random.
268 SELECT rowid FROM t1 ORDER BY random() LIMIT 20000
271 # Delete 20000 random rows from the table.
273 speed_trial speed1-random-del1 20000 row {
275 (SELECT rowid FROM t1 ORDER BY random() LIMIT 20000)
282 # Delete 20000 more rows at random from the table.
284 speed_trial speed1-random-del2 20000 row {
[all …]
H A Dspeed1p.explain23 # Set a uniform random seed
189 # 100000 random SELECTs against rowid.
206 # 100000 random SELECTs against a unique indexed column.
335 # Select 20000 rows from the table at random.
339 SELECT rowid FROM t1 ORDER BY random() LIMIT 20000
342 # Delete 20000 random rows from the table.
346 speed_trial speed1p-random-del1 20000 row {
348 (SELECT rowid FROM t1 ORDER BY random() LIMIT 20000)
355 # Delete 20000 more rows at random from the table.
357 speed_trial speed1p-random-del2 20000 row {
[all …]
H A Dcrash2.test56 # of different seeds for the random number generator.
60 [string repeat {SELECT random();} $ii]
98 SELECT random() FROM abc LIMIT $i;
99 INSERT INTO abc SELECT randstr(10,10), 0, 0 FROM abc WHERE random()%2==0;
100 DELETE FROM abc WHERE random()%2!=0;
121 SELECT random() FROM abc LIMIT $i;
122 INSERT INTO abc SELECT randstr(10,10), 0, 0 FROM abc WHERE random()%2==0;
123 DELETE FROM abc WHERE random()%2!=0;
H A Doptfuzz-db01.txt17 INSERT INTO t1(a,b,c,d,e) SELECT x,abs(random()%51),
18 abs(random()%100), abs(random()%51), abs(random()%100) FROM c;
22 INSERT INTO t3 SELECT a,b,c,d,e FROM t1 ORDER BY random() LIMIT 5;
23 INSERT INTO t3 SELECT null,b,c,d,e FROM t1 ORDER BY random() LIMIT 5;
24 INSERT INTO t3 SELECT a,null,c,d,e FROM t1 ORDER BY random() LIMIT 5;
25 INSERT INTO t3 SELECT a,b,null,d,e FROM t1 ORDER BY random() LIMIT 5;
26 INSERT INTO t3 SELECT a,b,c,null,e FROM t1 ORDER BY random() LIMIT 5;
27 INSERT INTO t3 SELECT a,b,c,d,null FROM t1 ORDER BY random() LIMIT 5;
86 (SELECT c,d,e FROM t1 WHERE t1.a=abs(t5.a+random()/100)%50+1);
H A Dsavepoint2.test55 DELETE FROM t3 WHERE random()%10!=0;
60 DELETE FROM t3 WHERE random()%10!=0;
62 DELETE FROM t3 WHERE random()%10!=0;
66 UPDATE t3 SET x = randstr(10, 400) WHERE random()%10;
67 INSERT INTO t3 SELECT x FROM t3 WHERE random()%10;
68 DELETE FROM t3 WHERE random()%10;
71 INSERT INTO t3 SELECT randstr(10,400) FROM t3 WHERE (random()%10 == 0);
H A DcorruptC.test59 # Generate random integer
61 proc random {range} {
72 # Set a quasi-random random seed.
75 # random seed for each run. Ideally we would like
311 # Now test for a series of quasi-random seeds.
321 # Seek to a random location in the file, and write a random single byte
335 # insert random byte at random location
336 set roffset [random $fsize]
338 set rbyte [format %02x [random 255]]
350 # do a few random operations to make sure that if
H A Dcrash.test169 # The test is repeated a few times with different seeds for the random
171 # seed the random number generator directly, some SQL is added to the test
194 SELECT random() FROM abc LIMIT $i;
196 DELETE FROM abc WHERE random()%10!=0;
239 DELETE FROM abc WHERE random()%10!=0;
241 DELETE FROM abc2 WHERE random()%10!=0;
271 DELETE FROM abc WHERE random()%10!=0;
273 DELETE FROM abc2 WHERE random()%10!=0;
297 SELECT random() FROM abc LIMIT $i;
299 DELETE FROM abc WHERE random()%10!=0;
[all …]
H A Dsoak.test45 # pseudo-random data in some way over and over again for a very
50 # fuzz.test (pseudo-random SQL statements)
51 # trans.test (pseudo-random changes to a database followed by rollbacks)
53 # corruptC.test (pseudo-random corruption to a database)
H A Dtrans2.test20 # A procedure to scramble the elements of list $inlist into a random order.
162 THEN zeroblob((random()&65535)%5000 + 1000) END;
186 THEN zeroblob((random()&65535)%5000 + 1000) END;
216 THEN zeroblob((random()&65535)%5000 + 1000) END;
222 THEN zeroblob((random()&65535)%5000 + 1000) END;
H A Dcrash3.test149 DELETE FROM abc WHERE random()%5;
153 WHERE (random()%5)==0;
154 DELETE FROM def WHERE random()%5;
158 WHERE (random()%5)==0;
H A Dcrash6.test105 SELECT random() FROM abc LIMIT $ii;
106 INSERT INTO abc SELECT randstr(10,10), 0, 0 FROM abc WHERE random()%2==0;
107 DELETE FROM abc WHERE random()%2!=0;
H A Dwhere2.test112 SELECT * FROM t1 WHERE w=85 ORDER BY random();
117 SELECT * FROM t1 WHERE x=6 AND y=7396 ORDER BY random();
122 SELECT * FROM t1 WHERE rowid=85 AND x=6 AND y=7396 ORDER BY random();
127 # Make sure "ORDER BY random" does not gets optimized out.
138 set sql {SELECT * FROM x1, x2 WHERE x=1 ORDER BY random()}
145 -- random() is not optimized out
146 EXPLAIN SELECT * FROM x1, x2 WHERE x=1 ORDER BY random();
147 } {/ random/}
149 -- random() is not optimized out
150 EXPLAIN SELECT * FROM x1, x2 WHERE x=1 ORDER BY random();
H A Dmemdb.test86 DELETE FROM t3 WHERE random()%10!=0;
98 DELETE FROM t3 WHERE random()%10!=0;
100 DELETE FROM t3 WHERE random()%10!=0;
109 INSERT INTO t3 SELECT randstr(10,400) FROM t3 WHERE random()%10==0;
379 (SELECT x FROM t6 ORDER BY random() LIMIT 1)"
H A Dfuzz.test12 # focus of this file is generating semi-random strings of SQL
93 SELECT 1 FROM (SELECT * FROM sqlite_master WHERE random())
252 SELECT 'hardware', 56.1 NOTNULL, random()&0
263 HAVING random()
H A Dbtree02.test24 INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
50 db eval {INSERT INTO t1(a,ax,b) VALUES(printf('(%s)',$a),random(),$bx)}
/sqlite-3.40.0/ext/session/
H A Dsession5.test267 append sql1 "INSERT INTO x1 VALUES(randomblob(20+(random()%10)), $i);"
287 CASE WHEN random()%2 THEN random() ELSE randomblob(20+random()%10) END,
288 CASE WHEN random()%2 THEN random() ELSE randomblob(20+random()%10) END
/sqlite-3.40.0/src/
H A Dtest6.c242 char random; in writeListSync() local
243 sqlite3_randomness(1, &random); in writeListSync()
249 random &= 0x01; in writeListSync()
257 random = 0; in writeListSync()
268 random = 0; in writeListSync()
272 if( (random&0x06)==0x06 ){ in writeListSync()
275 eAction = ((random&0x01)?2:1); in writeListSync()
/sqlite-3.40.0/tool/
H A Dmkspeedsql.tcl220 SELECT rowid FROM t1 ORDER BY random() LIMIT 20000;
227 (SELECT rowid FROM t1 ORDER BY random() LIMIT 20000);
235 (SELECT rowid FROM t1 ORDER BY random() LIMIT 20000);
/sqlite-3.40.0/ext/rtree/
H A Drtree4.test63 # Scramble the $inlist into a random order.
78 # Always use the same random seed so that the sequence of tests
112 # Do a random insert
218 # constraints appear in a random order.
234 # constraints appear in a random order.
/sqlite-3.40.0/ext/wasm/fiddle/
H A Dfiddle-worker.js288 : ("db-"+((Math.random() * 10000000) | 0)+
289 "-"+((Math.random() * 10000000) | 0)+".sqlite3")

1234