Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: third_party/sqlite/src/test/gcfault.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/fuzzer2.test ('k') | third_party/sqlite/src/test/hexlit.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # 2016 December 30
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 # This file implements regression tests for SQLite library. The
12 # focus of this file is testing OOM error handling within the built-in
13 # group_concat() function.
14 #
15
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
18 set testprefix gcfault
19
20
21 foreach {enc} {
22 utf16
23 utf8
24 } {
25 reset_db
26 sqlite3_db_config_lookaside db 0 0 0
27 execsql "PRAGMA encoding = $enc"
28
29 do_execsql_test 1.$enc.1 {
30 CREATE TABLE s(i, s);
31 INSERT INTO s VALUES(1, ',0123456789,');
32 INSERT INTO s VALUES(2, X'2c303132333435363738392c');
33
34 CREATE TABLE e(e);
35 INSERT INTO e VALUES('v1'), ('v2');
36 } {}
37
38 do_faultsim_test 1.$enc.1 -faults oom* -body {
39 execsql { SELECT group_concat(e, (SELECT s FROM s WHERE i=1)) FROM e }
40 }
41
42 do_faultsim_test 1.$enc.2 -faults oom-t* -body {
43 execsql { SELECT group_concat(e, (SELECT s FROM s WHERE i=2)) FROM e }
44 }
45
46 do_faultsim_test 1.$enc.3 -faults oom-t* -prep {
47 set ::STMT [sqlite3_prepare db {SELECT group_concat(e, ?) FROM e} -1 dummy]
48 sqlite3_bind_text $::STMT 1 ",0123456789," 12
49 } -body {
50 while { "SQLITE_ROW"==[sqlite3_step $::STMT] } { }
51 } -test {
52 sqlite3_finalize $::STMT
53 }
54 }
55
56 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/fuzzer2.test ('k') | third_party/sqlite/src/test/hexlit.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698