aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifest23
-rw-r--r--manifest.uuid2
-rw-r--r--src/auth.c1
-rw-r--r--src/ctime.c6
-rw-r--r--test/auth2.test12
-rw-r--r--test/auth3.test21
-rw-r--r--test/parser1.test23
7 files changed, 60 insertions, 28 deletions
diff --git a/manifest b/manifest
index bcfd6a51f..7b451988d 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C All\sSQLite\sAPI\sfunctions\sand\scallbacks\sin\sthe\s'sqlite3ext.h'\sheader\sfile\smust\sbe\sdecorated\swith\sthe\scalling\sconvention.
-D 2016-07-28T18:49:20.480
+C Decorate\sall\sinterfaces\swith\scalling\sconvention\smacros.
+D 2016-07-28T18:55:57.809
F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc b8894e579e4a5f32d61eb9309dbdbd7c883d2e87
@@ -323,7 +323,7 @@ F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a
F src/alter.c cc28ab933ae615b22add0d609794ffb6596b42ea
F src/analyze.c 37fedc80ac966ce1745811746e68e4d8fa64c7fe
F src/attach.c 771153bd1f4ab0b97a44a13dde2c7e5e1efeba22
-F src/auth.c b56c78ebe40a2110fd361379f7e8162d23f92240
+F src/auth.c 5c8e0f37f785f935f589496801edd19840485853
F src/backup.c 6df65fdd569c901a418887a1a76f82ec35044556
F src/bitvec.c 3ee4c8b2c94ed3a7377256e18199e6ff5cf33f63
F src/btmutex.c bc87dd3b062cc26edfe79918de2200ccb8d41e73
@@ -333,7 +333,7 @@ F src/btreeInt.h c18b7d2a3494695133e4e60ee36061d37f45d9a5
F src/build.c d1fdfd7ab8f5447e494ef15825973bf0719527c6
F src/callback.c 2e76147783386374bf01b227f752c81ec872d730
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
-F src/ctime.c 61949e83c4c36e37195a8398ebc752780b534d95
+F src/ctime.c e77f3dc297b4b65c96da78b4ae4272fdfae863d7
F src/date.c 1cc9fb516ec9932c6fd4d2a0d2f8bc4480145c39
F src/dbstat.c 4f6f7f52b49beb9636ffbd517cfe44a402ba4ad0
F src/delete.c 4aba4214a377ce8ddde2d2e609777bcc8235200f
@@ -506,8 +506,8 @@ F test/attach3.test 359eb65d00102cdfcef6fa4e81dc1648f8f80b27
F test/attach4.test 53bf502f17647c6d6c5add46dda6bac8b6f4665c
F test/attachmalloc.test 3a4bfca9545bfe906a8d2e622de10fbac5b711b0
F test/auth.test 872a122b3977c1d1bb9fd637dc20016e5c01880f
-F test/auth2.test 264c6af53cad9aba5218c68bbe18036e39007bfa
-F test/auth3.test 5cfa94ed90c6617c42b7ba4b133fd79678b251c7
+F test/auth2.test 9eb7fce9f34bf1f50d3f366fb3e606be5a2000a1
+F test/auth3.test b810826b193831929951c0d50783a200e5ef6b72
F test/autoinc.test c58912526998a39e11f66b533e23cfabea7f25b7
F test/autoindex1.test 14b63a9f1e405fe6d5bfc8c8d00249c2ebaf13ea
F test/autoindex2.test 12ef578928102baaa0dc23ad397601a2f4ecb0df
@@ -985,7 +985,7 @@ F test/pagerfault2.test caf4c7facb914fd3b03a17b31ae2b180c8d6ca1f
F test/pagerfault3.test 1003fcda009bf48a8e22a516e193b6ef0dd1bbd8
F test/pageropt.test 84e4cc5cbca285357f7906e99b21be4f2bf5abc0
F test/pagesize.test 5769fc62d8c890a83a503f67d47508dfdc543305
-F test/parser1.test 222b5cbf3e2e659fec1bf7d723488c8b9c94f1d0
+F test/parser1.test 391b9bf9a229547a129c61ac345ed1a6f5eb1854
F test/pcache.test c8acbedd3b6fd0f9a7ca887a83b11d24a007972b
F test/pcache2.test af7f3deb1a819f77a6d0d81534e97d1cf62cd442
F test/percentile.test 4243af26b8f3f4555abe166f723715a1f74c77ff
@@ -1508,7 +1508,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 959cd0131a5c717679b6e250229794679efe7f69
-R 5c0ac8119f9b9a2ca4c809f0833a7b7c
-U mistachkin
-Z 4646b26f0f26be9837f9ae84f1defbff
+P 805d01cdabb48a69eb986a7f084e53eb25d76b7f 97fc6e4328fe72cdd10f11a4b4bc9ce14bdc537f
+R 8897711bcf29ba23a6ba0e1e7c3853bd
+T +closed 97fc6e4328fe72cdd10f11a4b4bc9ce14bdc537f
+U drh
+Z 6ec050f366e0cbc18c7d1fd514c95e5b
diff --git a/manifest.uuid b/manifest.uuid
index d28a372fd..76c400fd3 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-97fc6e4328fe72cdd10f11a4b4bc9ce14bdc537f \ No newline at end of file
+fd784887e125bf95f4799ad09cbcba6795173487 \ No newline at end of file
diff --git a/src/auth.c b/src/auth.c
index 9768fc2fc..8a3f8e7d0 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -111,6 +111,7 @@ int sqlite3AuthReadCol(
char *zDb = db->aDb[iDb].zName; /* Name of attached database */
int rc; /* Auth callback return code */
+ if( db->init.busy ) return SQLITE_OK;
rc = db->xAuth(db->pAuthArg, SQLITE_READ, zTab,zCol,zDb,pParse->zAuthContext
#ifdef SQLITE_USER_AUTHENTICATION
,db->auth.zAuthUser
diff --git a/src/ctime.c b/src/ctime.c
index 1a7c69f3b..09587ea88 100644
--- a/src/ctime.c
+++ b/src/ctime.c
@@ -45,8 +45,10 @@ static const char * const azCompileOpt[] = {
#if SQLITE_CHECK_PAGES
"CHECK_PAGES",
#endif
-#if defined(__clang__) && defined(__clang_version__)
- "COMPILER=clang-" __clang_version__,
+#if defined(__clang__) && defined(__clang_major__)
+ "COMPILER=clang-" CTIMEOPT_VAL(__clang_major__) "."
+ CTIMEOPT_VAL(__clang_minor__) "."
+ CTIMEOPT_VAL(__clang_patchlevel__),
#elif defined(_MSC_VER)
"COMPILER=msvc-" CTIMEOPT_VAL(_MSC_VER),
#elif defined(__GNUC__) && defined(__VERSION__)
diff --git a/test/auth2.test b/test/auth2.test
index a9d64d08a..08d46cac5 100644
--- a/test/auth2.test
+++ b/test/auth2.test
@@ -98,12 +98,6 @@ SQLITE_UPDATE sqlite_master tbl_name main {}
SQLITE_UPDATE sqlite_master rootpage main {}
SQLITE_UPDATE sqlite_master sql main {}
SQLITE_READ sqlite_master ROWID main {}
-SQLITE_READ sqlite_master name main {}
-SQLITE_READ sqlite_master rootpage main {}
-SQLITE_READ sqlite_master sql main {}
-SQLITE_READ sqlite_master tbl_name main {}
-SQLITE_READ sqlite_master type main {}
-SQLITE_READ sqlite_master ROWID main {}
}
do_test auth2-2.2 {
set ::authargs {}
@@ -119,12 +113,6 @@ SQLITE_UPDATE sqlite_master tbl_name main {}
SQLITE_UPDATE sqlite_master rootpage main {}
SQLITE_UPDATE sqlite_master sql main {}
SQLITE_READ sqlite_master ROWID main {}
-SQLITE_READ sqlite_master name main {}
-SQLITE_READ sqlite_master rootpage main {}
-SQLITE_READ sqlite_master sql main {}
-SQLITE_READ sqlite_master tbl_name main {}
-SQLITE_READ sqlite_master type main {}
-SQLITE_READ sqlite_master ROWID main {}
}
do_test auth2-2.3 {
set ::authargs {}
diff --git a/test/auth3.test b/test/auth3.test
index eef10b398..ca7e16c84 100644
--- a/test/auth3.test
+++ b/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 sqlite_temp_master;
+} {DoNotRead sqlite_autoindex_DoNotRead_1}
+
finish_test
diff --git a/test/parser1.test b/test/parser1.test
index 78c1a40c6..c708dded1 100644
--- a/test/parser1.test
+++ b/test/parser1.test
@@ -76,4 +76,27 @@ do_catchsql_test parser1-2.2 {
SELECT x FROM c;
} {1 {syntax error after column name "x"}}
+# Verify that the comma between multiple table constraints is
+# optional.
+#
+# The missing comma is technically a syntax error. But we have to support
+# it because there might be legacy databases that omit the commas in their
+# sqlite_master tables.
+#
+do_execsql_test parser1-3.1 {
+ CREATE TABLE t300(id INTEGER PRIMARY KEY);
+ CREATE TABLE t301(
+ id INTEGER PRIMARY KEY,
+ c1 INTEGER NOT NULL,
+ c2 INTEGER NOT NULL,
+ c3 BOOLEAN NOT NULL DEFAULT 0,
+ FOREIGN KEY(c1) REFERENCES t300(id) ON DELETE CASCADE ON UPDATE RESTRICT
+ /* no comma */
+ FOREIGN KEY(c2) REFERENCES t300(id) ON DELETE CASCADE ON UPDATE RESTRICT
+ /* no comma */
+ UNIQUE(c1, c2)
+ );
+ PRAGMA foreign_key_list(t301);
+} {0 0 t300 c2 id RESTRICT CASCADE NONE 1 0 t300 c1 id RESTRICT CASCADE NONE}
+
finish_test