aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION2
-rwxr-xr-xconfigure18
-rw-r--r--manifest20
-rw-r--r--manifest.uuid2
-rw-r--r--src/sqlite.h.in67
-rw-r--r--src/vtab.c17
-rw-r--r--tool/shell1.test2
7 files changed, 85 insertions, 43 deletions
diff --git a/VERSION b/VERSION
index c90806c1a..d2577d975 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.7.6.1
+3.7.7
diff --git a/configure b/configure
index c18e5d18e..6cd191260 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for sqlite 3.7.6.1.
+# Generated by GNU Autoconf 2.62 for sqlite 3.7.7.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='sqlite'
PACKAGE_TARNAME='sqlite'
-PACKAGE_VERSION='3.7.6.1'
-PACKAGE_STRING='sqlite 3.7.6.1'
+PACKAGE_VERSION='3.7.7'
+PACKAGE_STRING='sqlite 3.7.7'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
@@ -1485,7 +1485,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures sqlite 3.7.6.1 to adapt to many kinds of systems.
+\`configure' configures sqlite 3.7.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1550,7 +1550,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sqlite 3.7.6.1:";;
+ short | recursive ) echo "Configuration of sqlite 3.7.7:";;
esac
cat <<\_ACEOF
@@ -1666,7 +1666,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-sqlite configure 3.7.6.1
+sqlite configure 3.7.7
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1680,7 +1680,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by sqlite $as_me 3.7.6.1, which was
+It was created by sqlite $as_me 3.7.7, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -13942,7 +13942,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by sqlite $as_me 3.7.6.1, which was
+This file was extended by sqlite $as_me 3.7.7, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13995,7 +13995,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-sqlite config.status 3.7.6.1
+sqlite config.status 3.7.7
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/manifest b/manifest
index 71c47aa3e..edcbb7b26 100644
--- a/manifest
+++ b/manifest
@@ -1,11 +1,11 @@
-C Change\ssqlite3_create_module()\sso\sthat\sit\savoids\sresetting\sthe\sschema\sas\nlong\sas\spreexisting\smodules\sare\sunchanged.
-D 2011-05-05T13:54:28.663
+C Bump\sthe\sversion\snumber\sto\s3.7.7\son\saccount\sof\sthe\snew\ssqlite3_vtab_config()\nand\ssqlite3_vtab_on_conflict()\sinterfaces.\s\sUpdates\sto\sthe\sdocumentation\son\nthose\sinterfaces.
+D 2011-05-05T15:39:50.869
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 7a4d9524721d40ef9ee26f93f9bd6a51dba106f2
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F Makefile.vxworks c85ec1d8597fe2f7bc225af12ac1666e21379151
F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
-F VERSION c97e5dcdea2407f4a94f9740294cdf39ce9e88c4
+F VERSION 3fcdd7fbe3eb282df3978fe77288544543767961
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
F addopcodes.awk 17dc593f791f874d2c23a0f9360850ded0286531
F art/2005osaward.gif 0d1851b2a7c1c9d0ccce545f3e14bca42d7fd248
@@ -22,7 +22,7 @@ F art/src_logo.gif 9341ef09f0e53cd44c0c9b6fc3c16f7f3d6c2ad9
F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
F config.h.in 868fdb48c028421a203470e15c69ada15b9ba673
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
-F configure 61dbf78cdc4d6a871333dc599c130be6cce865c5 x
+F configure 1c31f231ba59b71ff81dbf5c7c7594fdc83803d5 x
F configure.ac 87a3c71bbe9c925381c154413eea7f3cdc397244
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538
@@ -179,7 +179,7 @@ F src/resolve.c 1c0f32b64f8e3f555fe1f732f9d6f501a7f05706
F src/rowset.c 69afa95a97c524ba6faf3805e717b5b7ae85a697
F src/select.c d9d440809025a58547e39f4f268c2a296bfb56ff
F src/shell.c 72e7e176bf46d5c6518d15ac4ad6847c4bb5df79
-F src/sqlite.h.in 5d25d06b8ae0d624179dba9bebb7cce48ce831f0
+F src/sqlite.h.in 9bf19a5dcf6317b0f091c255edaed0b1fc01dcd0
F src/sqlite3ext.h c90bd5507099f62043832d73f6425d8d5c5da754
F src/sqliteInt.h e70a03bb66d209e279b3edeb57d4fdc42a1d9fda
F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d
@@ -244,7 +244,7 @@ F src/vdbeaux.c 25aa5ba7d46b4fe7c8f33dc132d474242d5f9726
F src/vdbeblob.c c3ccb7c8732858c680f442932e66ad06bb036562
F src/vdbemem.c 0498796b6ffbe45e32960d6a1f5adfb6e419883b
F src/vdbetrace.c 5d0dc3d5fd54878cc8d6d28eb41deb8d5885b114
-F src/vtab.c cc56ae9512b65ac6b13b751ffa8649929831069d
+F src/vtab.c 1491acb3e0a67eafe69134fb65bfa0b7b7e82342
F src/wal.c 7334009b396285b658a95a3b6bc6d2b016a1f794
F src/wal.h 7a5fbb00114b7f2cd40c7e1003d4c41ce9d26840
F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
@@ -915,7 +915,7 @@ F tool/omittest.tcl b1dd290c1596e0f31fd335160a74ec5dfea3df4a
F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c
F tool/restore_jrnl.tcl 6957a34f8f1f0f8285e07536225ec3b292a9024a
F tool/rollback-test.c 9fc98427d1e23e84429d7e6d07d9094fbdec65a5
-F tool/shell1.test 44705d6078b37f58853005d2ad5f1e67bc9dbbed
+F tool/shell1.test 5542ecdc952f91121a835ed817e6feaf8988b333
F tool/shell2.test 5dc76b8005b465f420fed8241621da7513060ff3
F tool/shell3.test 4fad469e8003938426355afdf34155f08c587836
F tool/shell4.test 35f9c3d452b4e76d5013c63e1fd07478a62f14ce
@@ -933,7 +933,7 @@ F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 8f06ea33c9070de8ea85368d76cf26237d1aee73
-R aff00e1334f6da4cf8292fcebfc844bd
+P 8485855afc71fb8078d53719c3da75021890ce9e
+R d001197d2ada5bdc77fdb1803c900b72
U drh
-Z ad6da57164b98567e1b21b53456334e7
+Z b6f82da815334ecd28dc3bea3383de2d
diff --git a/manifest.uuid b/manifest.uuid
index 097842dbb..a54682b9b 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-8485855afc71fb8078d53719c3da75021890ce9e \ No newline at end of file
+930be6a1bdec8c150caafd790973f7a401fc1970 \ No newline at end of file
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index c93922f9d..19b418b43 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -370,7 +370,8 @@ int sqlite3_exec(
**
** New error codes may be added in future versions of SQLite.
**
-** See also: [SQLITE_IOERR_READ | extended result codes]
+** See also: [SQLITE_IOERR_READ | extended result codes],
+** [sqlite3_vtab_on_conflict()] [SQLITE_ROLLBACK | result codes].
*/
#define SQLITE_OK 0 /* Successful result */
/* beginning-of-error-codes */
@@ -2198,6 +2199,9 @@ int sqlite3_set_authorizer(
** to signal SQLite whether or not the action is permitted. See the
** [sqlite3_set_authorizer | authorizer documentation] for additional
** information.
+**
+** Note that SQLITE_IGNORE is also used as a [SQLITE_ROLLBACK | return code]
+** from the [sqlite3_vtab_on_conflict()] interface.
*/
#define SQLITE_DENY 1 /* Abort the SQL statement with an error */
#define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */
@@ -6400,31 +6404,46 @@ int sqlite3_wal_checkpoint_v2(
/*
** CAPI3REF: Virtual Table Interface Configuration
**
-** This function is called by a virtual table implementation to configure
-** various facets of the virtual table interface. At present, there is only
-** one option that may be configured using this function. Further options
+** This function may be called by either the [xConnect] or [xCreate] method
+** of a [virtual table] implementation to configure
+** various facets of the virtual table interface.
+**
+** If this interface is invoked outside the context of an xConnect or
+** xCreate virtual table method then the behavior is undefined.
+**
+** At present, there is only one option that may be configured using
+** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
** may be added in the future.
+*/
+int sqlite3_vtab_config(sqlite3*, int op, ...);
+
+/*
+** CAPI3REF: Virtual Table Configuration Options
+**
+** These macros define the various options to the
+** [sqlite3_vtab_config()] interface that [virtual table] implementations
+** can use to customize and optimize their behavior.
**
** <dl>
** <dt>SQLITE_VTAB_CONSTRAINT_SUPPORT
-** <dd>If the second argument to sqlite3_vtab_config() is
+** <dd>If the second argument to [sqlite3_vtab_config()] is
** SQLITE_VTAB_CONSTRAINT_SUPPORT, then SQLite expects this function to
** have been called with three arguments, the third of which being of
** type 'int'. If the third argument is zero, then the virtual table
** is indicating that it does not support constraints. In this case if
-** a call to the xUpdate method returns SQLITE_CONSTRAINT, the entire
+** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], the entire
** statement is rolled back as if [ON CONFLICT | OR ABORT] had been
** specified as part of the users SQL statement, regardless of the actual
** ON CONFLICT mode specified.
**
** If the third argument passed is non-zero, then the virtual table
-** implementation must guarantee that if xUpdate returns
-** SQLITE_CONSTRAINT, it does so before any modifications to internal
+** implementation must guarantee that if [xUpdate] returns
+** [SQLITE_CONSTRAINT], it does so before any modifications to internal
** or persistent data structures have been made. If the [ON CONFLICT]
** mode is ABORT, FAIL, IGNORE or ROLLBACK, SQLite is able to roll back
** a statement or database transaction, and abandon or continue processing
** the current SQL statement as appropriate. If the ON CONFLICT mode is
-** REPLACE and the xUpdate method returns SQLITE_CONSTRAINT, SQLite
+** REPLACE and the [xUpdate] method returns [SQLITE_CONSTRAINT], SQLite
** handles this as if the ON CONFLICT mode had been ABORT.
**
** Virtual table implementations that are required to handle OR REPLACE
@@ -6439,23 +6458,35 @@ int sqlite3_wal_checkpoint_v2(
**
*/
#define SQLITE_VTAB_CONSTRAINT_SUPPORT 1
-int sqlite3_vtab_config(sqlite3*, int op, ...);
/*
** CAPI3REF: Determine The Virtual Table Conflict Policy
**
-** This function may only be called from within a call to the xUpdate method
-** of a virtual table implementation for an INSERT or UPDATE operation. The
-** value returned is one of SQLITE_ROLLBACK, SQLITE_IGNORE, SQLITE_FAIL,
-** SQLITE_ABORT or SQLITE_REPLACE, according to the [ON CONFLICT] mode of the
-** SQL statement that triggered the callback.
+** This function may only be called from within a call to the [xUpdate] method
+** of a [virtual table] implementation for an INSERT or UPDATE operation. ^The
+** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
+** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
+** of the SQL statement that triggered the call to the [xUpdate] method of the
+** [virtual table].
+*/
+int sqlite3_vtab_on_conflict(sqlite3 *);
+
+/*
+** CAPI3REF: Conflict resolution modes
+**
+** These constants are returned by [sqlite3_vtab_on_conflict()] to
+** inform a [virtual table] implementation what the [ON CONFLICT] mode
+** is for the SQL statement being evaluated.
+**
+** Note that the [SQLITE_IGNORE] constant is also used as a potential
+** return value from the [sqlite3_set_authorizer()] callback and that
+** [SQLITE_ABORT] is also a [result code].
*/
#define SQLITE_ROLLBACK 1
-/* #define SQLITE_IGNORE 2 */
+/* #define SQLITE_IGNORE 2 // Also used by sqlite3_authorizer() callback */
#define SQLITE_FAIL 3
-/* #define SQLITE_ABORT 4 */
+/* #define SQLITE_ABORT 4 // Also an error code */
#define SQLITE_REPLACE 5
-int sqlite3_vtab_on_conflict(sqlite3 *);
diff --git a/src/vtab.c b/src/vtab.c
index 72775fa3c..cac9c9606 100644
--- a/src/vtab.c
+++ b/src/vtab.c
@@ -992,17 +992,28 @@ void sqlite3VtabMakeWritable(Parse *pParse, Table *pTab){
}
}
+/*
+** Return the ON CONFLICT resolution mode in effect for the virtual
+** table update operation currently in progress.
+**
+** The results of this routine are undefined unless it is called from
+** within an xUpdate method.
+*/
int sqlite3_vtab_on_conflict(sqlite3 *db){
- int aMap[] = {
+ static const unsigned char aMap[] = {
SQLITE_ROLLBACK, SQLITE_IGNORE, SQLITE_ABORT, SQLITE_FAIL, SQLITE_REPLACE
};
assert( OE_Rollback==1 && OE_Abort==2 && OE_Fail==3 );
assert( OE_Ignore==4 && OE_Replace==5 );
assert( db->vtabOnConflict>=1 && db->vtabOnConflict<=5 );
- return aMap[db->vtabOnConflict-1];
+ return (int)aMap[db->vtabOnConflict-1];
}
-
+/*
+** Call from within the xCreate() or xConnect() methods to provide
+** the SQLite core with additional information about the behavior
+** of the virtual table being implemented.
+*/
int sqlite3_vtab_config(sqlite3 *db, int op, ...){
va_list ap;
int rc = SQLITE_OK;
diff --git a/tool/shell1.test b/tool/shell1.test
index d066fc3c1..068f8ea25 100644
--- a/tool/shell1.test
+++ b/tool/shell1.test
@@ -200,7 +200,7 @@ do_test shell1-1.15.3 {
# -version show SQLite version
do_test shell1-1.16.1 {
catchcmd "-version test.db" ""
-} {0 3.7.6.1}
+} {0 3.7.7}
#----------------------------------------------------------------------------
# Test cases shell1-2.*: Basic "dot" command token parsing.