From: drh Date: Thu, 16 Sep 2010 19:49:22 +0000 (+0000) Subject: Updates to the requirements on the sqlite3_create_function() family of X-Git-Tag: experimental~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c5cecb63a98a5ecdc33dd78bd96957b1b7f0ba4;p=thirdparty%2Fsqlite.git Updates to the requirements on the sqlite3_create_function() family of interfaces. FossilOrigin-Name: f03c608993d1c37b45ba8e0a6a4e941bdcb57ffa --- diff --git a/manifest b/manifest index cde6a75811..ddf439c362 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,8 @@ -C Add\stests\sfor\sORDER\sBY,\sLIMIT\sand\sOFFSET\sclauses\sto\se_select.test. -D 2010-09-16T18:51:09 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +C Updates\sto\sthe\srequirements\son\sthe\ssqlite3_create_function()\sfamily\sof\ninterfaces. +D 2010-09-16T19:49:22 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in c599a15d268b1db2aeadea19df2adc3bf2eb6bee F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -121,7 +124,7 @@ F src/btree.c d878577184112d982d00ea05afcc7487cd9f06f5 F src/btree.h 2d1a83ad509047e8cc314fda7e054f99ff52414d F src/btreeInt.h c424f2f131cc61ddf130f9bd736b3df12c8a51f0 F src/build.c 5acc8a7d79ca81102a5d020fbafb7a4162f96d1d -F src/callback.c da3c38d0ef5d7f04fae371e519bda61aa9cb1704 +F src/callback.c a1d1b1c9c85415dff013af033e2fed9c8382d33b F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac F src/ctime.c 4f3aadad62c6c9f0d4e5a96718516ac4e3c598df F src/date.c 5dd8448a0bfea8d31fb14cff487d0c06ff8c8b20 @@ -174,7 +177,7 @@ F src/resolve.c 1c0f32b64f8e3f555fe1f732f9d6f501a7f05706 F src/rowset.c 69afa95a97c524ba6faf3805e717b5b7ae85a697 F src/select.c b0b124781474e4e0c8f64022875e5e2009e13443 F src/shell.c 8517fc1f9c59ae4007e6cc8b9af91ab231ea2056 -F src/sqlite.h.in f49225203481147f42df8939bf46290057898571 +F src/sqlite.h.in f344686426dadb264bbf66ba1b31625e4086871d F src/sqlite3ext.h 69dfb8116af51b84a029cddb3b35062354270c89 F src/sqliteInt.h ef7ed8746759c09edd87e5550de973a4da3e4ca7 F src/sqliteLimit.h a17dcd3fb775d63b64a43a55c54cb282f9726f44 @@ -857,7 +860,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 3e649f80e2a1b2e098f6ca32994ba40157271e69 -R 62bec971cfb429e388867311d3233a9a -U dan -Z 8ab963ff6625685ba34c3c915673797e +P 7c989db55cbe87dfb8659dcf534f72cdc2df3bc5 +R a7ef1964340e5f47af1fec59a1029401 +U drh +Z 8688bb5b00e0a227ea363f531733621c +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.6 (GNU/Linux) + +iD8DBQFMknTFoxKgR168RlERAr70AJ95KMxwWpVNNQCnjU8fku5/6SkSewCfSc1q +g+fCP5Z+6Ys6k6x9YjFh3vg= +=rhFO +-----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index f53744ae8d..7618ac4182 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7c989db55cbe87dfb8659dcf534f72cdc2df3bc5 \ No newline at end of file +f03c608993d1c37b45ba8e0a6a4e941bdcb57ffa \ No newline at end of file diff --git a/src/callback.c b/src/callback.c index fdcc9f9c08..eaff6d0e06 100644 --- a/src/callback.c +++ b/src/callback.c @@ -358,7 +358,7 @@ FuncDef *sqlite3FindFunction( ** priority to built-in functions. ** ** Except, if createFlag is true, that means that we are trying to - ** install a new function. Whatever FuncDef structure is returned will + ** install a new function. Whatever FuncDef structure is returned it will ** have fields overwritten with new information appropriate for the ** new function. But the FuncDefs for built-in functions are read-only. ** So we must not search for built-ins when creating a new function. diff --git a/src/sqlite.h.in b/src/sqlite.h.in index cfcfd99080..cf0424657b 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -3333,8 +3333,8 @@ int sqlite3_reset(sqlite3_stmt *pStmt); ** ** ^The fourth parameter, eTextRep, specifies what ** [SQLITE_UTF8 | text encoding] this SQL function prefers for -** its parameters. Any SQL function implementation should be able to work -** work with UTF-8, UTF-16le, or UTF-16be. But some implementations may be +** its parameters. Every SQL function implementation must be able to work +** with UTF-8, UTF-16le, or UTF-16be. But some implementations may be ** more efficient with one encoding than another. ^An application may ** invoke sqlite3_create_function() or sqlite3_create_function16() multiple ** times with the same function but with different values of eTextRep. @@ -3355,6 +3355,13 @@ int sqlite3_reset(sqlite3_stmt *pStmt); ** SQL function or aggregate, pass NULL poiners for all three function ** callbacks. ** +** ^If the tenth parameter to sqlite3_create_function_v2() is not NULL, +** then it is invoked when the function is deleted, either by being +** overloaded or when the database connection closes. +** ^When the destructure callback of the tenth parameter is invoked, it +** is passed a single argument which is a copy of the pointer which was +** the fifth parameter to sqlite3_create_function_v2(). +** ** ^It is permitted to register multiple implementations of the same ** functions with the same name but with either differing numbers of ** arguments or differing preferred text encodings. ^SQLite will use @@ -3369,11 +3376,6 @@ int sqlite3_reset(sqlite3_stmt *pStmt); ** between UTF8 and UTF16. ** ** ^Built-in functions may be overloaded by new application-defined functions. -** ^The first application-defined function with a given name overrides all -** built-in functions in the same [database connection] with the same name. -** ^Subsequent application-defined functions of the same name only override -** prior application-defined functions that are an exact match for the -** number of parameters and preferred encoding. ** ** ^An application-defined function is permitted to call other ** SQLite interfaces. However, such calls must not