| Index: third_party/sqlite/src/test/auth3.test
|
| diff --git a/third_party/sqlite/src/test/auth3.test b/third_party/sqlite/src/test/auth3.test
|
| index eef10b398f03f43d4b0b62b55cb94aac846c6dcc..013486e5a03d1cd3c5e49a329d6203cd24001016 100644
|
| --- a/third_party/sqlite/src/test/auth3.test
|
| +++ b/third_party/sqlite/src/test/auth3.test
|
| @@ -12,8 +12,7 @@
|
| # Test that the truncate optimization is disabled if the SQLITE_DELETE
|
| # authorization callback returns SQLITE_IGNORE.
|
| #
|
| -# $Id: auth3.test,v 1.2 2009/05/04 01:58:31 drh Exp $
|
| -#
|
| +# Test that authorizer is disabled during schema parsing.
|
|
|
| set testdir [file dirname $argv0]
|
| source $testdir/tester.tcl
|
| @@ -108,4 +107,22 @@ do_test auth3-2.2 {
|
| set sqlite_search_count
|
| } {1}
|
|
|
| +# 2016-07-28. A problem report from a private client complaining about
|
| +# an authorizer failure during an ALTER TABLE. The solution (I think) is
|
| +# to disable the authorizer during schema parsing.
|
| +#
|
| +proc auth {code args} {
|
| + if {$code=="SQLITE_READ" && [regexp {DoNotRead} $args]} {
|
| + return SQLITE_DENY
|
| + }
|
| + return SQLITE_OK
|
| +}
|
| +do_execsql_test auth3-3.0 {
|
| + CREATE TEMPORARY TABLE TempTable (
|
| + key TEXT NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE,
|
| + value TEXT NOT NULL ON CONFLICT FAIL);
|
| + ALTER TABLE TempTable RENAME TO DoNotRead;
|
| + SELECT name FROM temp.sqlite_master;
|
| +} {DoNotRead sqlite_autoindex_DoNotRead_1}
|
| +
|
| finish_test
|
|
|