]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix an incorrect assert() in sqlite3_value_config(). Updates to the
authordrh <drh@noemail.net>
Thu, 5 May 2011 23:07:43 +0000 (23:07 +0000)
committerdrh <drh@noemail.net>
Thu, 5 May 2011 23:07:43 +0000 (23:07 +0000)
sqlite3_value_config() documentation.

FossilOrigin-Name: 22cbc01a2600c6100112315d9afb5f2d8f80b3df

manifest
manifest.uuid
src/sqlite.h.in
src/vtab.c

index e38d1ab9ba43d9d036e40b086d9829fa734e1a6e..990f957862c42a8089657ccced8034fa0aba5cca 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\ssqlite3_vtab_on_conflict()\sto\sreturn\sthe\scorrect\svalues\sfor\nABORT,\sFAIL,\sand\sIGNORE.
-D 2011-05-05T17:41:58.205
+C Fix\san\sincorrect\sassert()\sin\ssqlite3_value_config().\s\sUpdates\sto\sthe\nsqlite3_value_config()\sdocumentation.
+D 2011-05-05T23:07:43.483
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 7a4d9524721d40ef9ee26f93f9bd6a51dba106f2
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -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 9bf19a5dcf6317b0f091c255edaed0b1fc01dcd0
+F src/sqlite.h.in 7f5ec849936098c5932b43fea2b1c5a4e1ec87b7
 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 5e17098829cb1533ae85aa46de98aa175f65eb83
+F src/vtab.c bfd252c7d699ccb1287bea3e5ca49eac2222beb0
 F src/wal.c 7334009b396285b658a95a3b6bc6d2b016a1f794
 F src/wal.h 7a5fbb00114b7f2cd40c7e1003d4c41ce9d26840
 F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
@@ -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 8ba456ae0b3d0c0b6f72f98bd0bc28f72dfa4ff5
-R e350890a304deaff131b57483c8e478b
+P f0617d619dc6654f6d27543999c0aad724a0d967
+R 31cf9f23f5ca6aefc15da38ca5caec3a
 U drh
-Z 6b45c0a2e4c7eb15d8acfe532af4cf91
+Z 536ce71311e8f997eb3d277fca3551df
index 89a83c1a8bd1d211bc215f46430e83671a50cbe3..c09f6aed827f31fe46f9f70974118a432a43004c 100644 (file)
@@ -1 +1 @@
-f0617d619dc6654f6d27543999c0aad724a0d967
\ No newline at end of file
+22cbc01a2600c6100112315d9afb5f2d8f80b3df
\ No newline at end of file
index 19b418b4397ddbc3be3d323a9ee8bb560ccc5027..dfd794cf08c75bb113494599c87aeb64bf5159ce 100644 (file)
@@ -6425,37 +6425,36 @@ int sqlite3_vtab_config(sqlite3*, int op, ...);
 ** can use to customize and optimize their behavior.
 **
 ** <dl>
-**   <dt>SQLITE_VTAB_CONSTRAINT_SUPPORT
-**   <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
-**       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
-**       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
-**       handles this as if the ON CONFLICT mode had been ABORT.
-**
-**       Virtual table implementations that are required to handle OR REPLACE
-**       must do so within the xUpdate method. If a call to the 
-**       [sqlite3_vtab_on_conflict()] function indicates that the current ON 
-**       CONFLICT policy is REPLACE, the virtual table implementation should 
-**       silently replace the appropriate rows within the xUpdate callback and
-**       return SQLITE_OK. Or, if this is not possible, it may return
-**       SQLITE_CONSTRAINT, in which case SQLite falls back to OR ABORT 
-**       constraint handling.
+** <dt>SQLITE_VTAB_CONSTRAINT_SUPPORT
+** <dd>Calls of the form
+** [sqlite3_vtab_config](db,SQLITE_VTAB_CONSTRAINT_SUPPORT,X) are supported,
+** where X is an integer.  If X is zero, then the [virtual table] whose
+** [xCreate] or [xConnect] method invoked [sqlite3_vtab_config()] does not
+** support constraints.  In this configuration (which is the default) if
+** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then 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 X is non-zero, then the virtual table implementation guarantees
+** that if [xUpdate] returns [SQLITE_CONSTRAINT], it will do 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 handles this as if the ON CONFLICT mode
+** had been ABORT.
+**
+** Virtual table implementations that are required to handle OR REPLACE
+** must do so within the [xUpdate] method. If a call to the 
+** [sqlite3_vtab_on_conflict()] function indicates that the current ON 
+** CONFLICT policy is REPLACE, the virtual table implementation should 
+** silently replace the appropriate rows within the xUpdate callback and
+** return SQLITE_OK. Or, if this is not possible, it may return
+** SQLITE_CONSTRAINT, in which case SQLite falls back to OR ABORT 
+** constraint handling.
 ** </dl>
-** 
 */
 #define SQLITE_VTAB_CONSTRAINT_SUPPORT 1
 
index ce48c932f971f4dd7509a444d2ab1c224168ba22..e7f7287da8d234a0f290f8529ae0ead0b9fc5b94 100644 (file)
@@ -1027,7 +1027,7 @@ int sqlite3_vtab_config(sqlite3 *db, int op, ...){
       if( !p ){
         rc = SQLITE_MISUSE_BKPT;
       }else{
-        assert( (p->pTab->tabFlags & TF_Virtual)!=0 );
+        assert( p->pTab==0 || (p->pTab->tabFlags & TF_Virtual)!=0 );
         p->pVTable->bConstraint = (u8)va_arg(ap, int);
       }
       break;