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

Side by Side Diff: third_party/sqlite/src/test/auth3.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/auth2.test ('k') | third_party/sqlite/src/test/autoinc.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2008 October 27 1 # 2008 October 27
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
11 # 11 #
12 # Test that the truncate optimization is disabled if the SQLITE_DELETE 12 # Test that the truncate optimization is disabled if the SQLITE_DELETE
13 # authorization callback returns SQLITE_IGNORE. 13 # authorization callback returns SQLITE_IGNORE.
14 # 14 #
15 # $Id: auth3.test,v 1.2 2009/05/04 01:58:31 drh Exp $ 15 # Test that authorizer is disabled during schema parsing.
16 #
17 16
18 set testdir [file dirname $argv0] 17 set testdir [file dirname $argv0]
19 source $testdir/tester.tcl 18 source $testdir/tester.tcl
20 19
21 # disable this test if the SQLITE_OMIT_AUTHORIZATION macro is 20 # disable this test if the SQLITE_OMIT_AUTHORIZATION macro is
22 # defined during compilation. 21 # defined during compilation.
23 if {[catch {db auth {}} msg]} { 22 if {[catch {db auth {}} msg]} {
24 finish_test 23 finish_test
25 return 24 return
26 } 25 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 INSERT INTO t1 VALUES(1, 2, 3); 100 INSERT INTO t1 VALUES(1, 2, 3);
102 INSERT INTO t1 VALUES(4, 5, 6); 101 INSERT INTO t1 VALUES(4, 5, 6);
103 } 102 }
104 set sqlite_search_count 0 103 set sqlite_search_count 0
105 execsql { 104 execsql {
106 DELETE FROM t1; 105 DELETE FROM t1;
107 } 106 }
108 set sqlite_search_count 107 set sqlite_search_count
109 } {1} 108 } {1}
110 109
110 # 2016-07-28. A problem report from a private client complaining about
111 # an authorizer failure during an ALTER TABLE. The solution (I think) is
112 # to disable the authorizer during schema parsing.
113 #
114 proc auth {code args} {
115 if {$code=="SQLITE_READ" && [regexp {DoNotRead} $args]} {
116 return SQLITE_DENY
117 }
118 return SQLITE_OK
119 }
120 do_execsql_test auth3-3.0 {
121 CREATE TEMPORARY TABLE TempTable (
122 key TEXT NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE,
123 value TEXT NOT NULL ON CONFLICT FAIL);
124 ALTER TABLE TempTable RENAME TO DoNotRead;
125 SELECT name FROM temp.sqlite_master;
126 } {DoNotRead sqlite_autoindex_DoNotRead_1}
127
111 finish_test 128 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/auth2.test ('k') | third_party/sqlite/src/test/autoinc.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698