Fossil SCM

Update SQLite the latest 3.8.0 beta, hopefully fixing an alignment problem on sparc.

drh 2013-07-18 14:53 trunk
Commit 01196ad38c480884ea80fafc8916d5284278f353
2 files changed +26 -16 +24 -15
+26 -16
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -670,11 +670,11 @@
670670
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
671671
** [sqlite_version()] and [sqlite_source_id()].
672672
*/
673673
#define SQLITE_VERSION "3.8.0"
674674
#define SQLITE_VERSION_NUMBER 3008000
675
-#define SQLITE_SOURCE_ID "2013-07-17 11:54:47 64bf8148b84e0ebb45c12b629f49bc9b316aceba"
675
+#define SQLITE_SOURCE_ID "2013-07-18 14:50:56 5dcffa671f592ae9355628afa439ae9a2d26f0cd"
676676
677677
/*
678678
** CAPI3REF: Run-Time Library Version Numbers
679679
** KEYWORDS: sqlite3_version, sqlite3_sourceid
680680
**
@@ -4745,12 +4745,12 @@
47454745
** CAPI3REF: Function Auxiliary Data
47464746
**
47474747
** The following two functions may be used by scalar SQL functions to
47484748
** associate metadata with argument values. If the same value is passed to
47494749
** multiple invocations of the same SQL function during query execution, under
4750
-** some circumstances the associated metadata may be preserved. This may
4751
-** be used, for example, to add a regular-expression matching scalar
4750
+** some circumstances the associated metadata may be preserved. This might
4751
+** be used, for example, in a regular-expression matching
47524752
** function. The compiled version of the regular expression is stored as
47534753
** metadata associated with the SQL value passed as the regular expression
47544754
** pattern. The compiled regular expression can be reused on multiple
47554755
** invocations of the same function so that the original pattern string
47564756
** does not need to be recompiled on each invocation.
@@ -4760,27 +4760,36 @@
47604760
** value to the application-defined function. ^If no metadata has been ever
47614761
** been set for the Nth argument of the function, or if the corresponding
47624762
** function parameter has changed since the meta-data was set,
47634763
** then sqlite3_get_auxdata() returns a NULL pointer.
47644764
**
4765
-** ^The sqlite3_set_auxdata() interface saves the metadata
4766
-** pointed to by its 3rd parameter as the metadata for the N-th
4767
-** argument of the application-defined function. Subsequent
4768
-** calls to sqlite3_get_auxdata() might return this data, if it has
4769
-** not been destroyed.
4770
-** ^If it is not NULL, SQLite will invoke the destructor
4771
-** function given by the 4th parameter to sqlite3_set_auxdata() on
4772
-** the metadata when the corresponding function parameter changes
4773
-** or when the SQL statement completes, whichever comes first.
4765
+** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as metadata for the N-th
4766
+** argument of the application-defined function. ^Subsequent
4767
+** calls to sqlite3_get_auxdata(C,N) return P from the most recent
4768
+** sqlite3_set_auxdata(C,N,P,X) call if the data has not been dropped, or
4769
+** NULL if the data has been dropped.
4770
+** ^(If it is not NULL, SQLite will invoke the destructor
4771
+** function X passed to sqlite3_set_auxdata(C,N,P,X) when <ul>
4772
+** <li> the corresponding function parameter changes,
4773
+** <li> [sqlite3_reset()] or [sqlite3_finalize()] is called for the
4774
+** SQL statement,
4775
+** <li> sqlite3_set_auxdata() is invoked again on the same parameter, or
4776
+** <li> a memory allocation error occurs. </ul>)^
47744777
**
47754778
** SQLite is free to call the destructor and drop metadata on any
47764779
** parameter of any function at any time. ^The only guarantee is that
4777
-** the destructor will be called before the metadata is dropped.
4780
+** the destructor will be called when the [prepared statement] is destroyed.
4781
+** Note in particular that the destructor X in the call to
4782
+** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before
4783
+** the sqlite3_set_auxdata() call even returns. Hence sqlite3_set_auxdata()
4784
+** should be called near the end of the function implementation and the
4785
+** implementation should not make any use of P after sqlite3_set_auxdata()
4786
+** has been called.
47784787
**
47794788
** ^(In practice, metadata is preserved between function calls for
4780
-** expressions that are constant at compile time. This includes literal
4781
-** values and [parameters].)^
4789
+** function parameters that are compile-time constants, including literal
4790
+** values and [parameters] and expressions composed from the same.)^
47824791
**
47834792
** These routines must be called from the same thread in which
47844793
** the SQL function is running.
47854794
*/
47864795
SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
@@ -110176,11 +110185,12 @@
110176110185
pWInfo->wctrlFlags = wctrlFlags;
110177110186
pWInfo->savedNQueryLoop = pParse->nQueryLoop;
110178110187
pMaskSet = &pWInfo->sMaskSet;
110179110188
sWLB.pWInfo = pWInfo;
110180110189
sWLB.pWC = &pWInfo->sWC;
110181
- sWLB.pNew = (WhereLoop*)&pWInfo->a[nTabList];
110190
+ sWLB.pNew = (WhereLoop*)(((char*)pWInfo)+nByteWInfo);
110191
+ assert( EIGHT_BYTE_ALIGNMENT(sWLB.pNew) );
110182110192
whereLoopInit(sWLB.pNew);
110183110193
#ifdef SQLITE_DEBUG
110184110194
sWLB.pNew->cId = '*';
110185110195
#endif
110186110196
110187110197
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -670,11 +670,11 @@
670 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
671 ** [sqlite_version()] and [sqlite_source_id()].
672 */
673 #define SQLITE_VERSION "3.8.0"
674 #define SQLITE_VERSION_NUMBER 3008000
675 #define SQLITE_SOURCE_ID "2013-07-17 11:54:47 64bf8148b84e0ebb45c12b629f49bc9b316aceba"
676
677 /*
678 ** CAPI3REF: Run-Time Library Version Numbers
679 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
680 **
@@ -4745,12 +4745,12 @@
4745 ** CAPI3REF: Function Auxiliary Data
4746 **
4747 ** The following two functions may be used by scalar SQL functions to
4748 ** associate metadata with argument values. If the same value is passed to
4749 ** multiple invocations of the same SQL function during query execution, under
4750 ** some circumstances the associated metadata may be preserved. This may
4751 ** be used, for example, to add a regular-expression matching scalar
4752 ** function. The compiled version of the regular expression is stored as
4753 ** metadata associated with the SQL value passed as the regular expression
4754 ** pattern. The compiled regular expression can be reused on multiple
4755 ** invocations of the same function so that the original pattern string
4756 ** does not need to be recompiled on each invocation.
@@ -4760,27 +4760,36 @@
4760 ** value to the application-defined function. ^If no metadata has been ever
4761 ** been set for the Nth argument of the function, or if the corresponding
4762 ** function parameter has changed since the meta-data was set,
4763 ** then sqlite3_get_auxdata() returns a NULL pointer.
4764 **
4765 ** ^The sqlite3_set_auxdata() interface saves the metadata
4766 ** pointed to by its 3rd parameter as the metadata for the N-th
4767 ** argument of the application-defined function. Subsequent
4768 ** calls to sqlite3_get_auxdata() might return this data, if it has
4769 ** not been destroyed.
4770 ** ^If it is not NULL, SQLite will invoke the destructor
4771 ** function given by the 4th parameter to sqlite3_set_auxdata() on
4772 ** the metadata when the corresponding function parameter changes
4773 ** or when the SQL statement completes, whichever comes first.
 
 
 
4774 **
4775 ** SQLite is free to call the destructor and drop metadata on any
4776 ** parameter of any function at any time. ^The only guarantee is that
4777 ** the destructor will be called before the metadata is dropped.
 
 
 
 
 
 
4778 **
4779 ** ^(In practice, metadata is preserved between function calls for
4780 ** expressions that are constant at compile time. This includes literal
4781 ** values and [parameters].)^
4782 **
4783 ** These routines must be called from the same thread in which
4784 ** the SQL function is running.
4785 */
4786 SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
@@ -110176,11 +110185,12 @@
110176 pWInfo->wctrlFlags = wctrlFlags;
110177 pWInfo->savedNQueryLoop = pParse->nQueryLoop;
110178 pMaskSet = &pWInfo->sMaskSet;
110179 sWLB.pWInfo = pWInfo;
110180 sWLB.pWC = &pWInfo->sWC;
110181 sWLB.pNew = (WhereLoop*)&pWInfo->a[nTabList];
 
110182 whereLoopInit(sWLB.pNew);
110183 #ifdef SQLITE_DEBUG
110184 sWLB.pNew->cId = '*';
110185 #endif
110186
110187
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -670,11 +670,11 @@
670 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
671 ** [sqlite_version()] and [sqlite_source_id()].
672 */
673 #define SQLITE_VERSION "3.8.0"
674 #define SQLITE_VERSION_NUMBER 3008000
675 #define SQLITE_SOURCE_ID "2013-07-18 14:50:56 5dcffa671f592ae9355628afa439ae9a2d26f0cd"
676
677 /*
678 ** CAPI3REF: Run-Time Library Version Numbers
679 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
680 **
@@ -4745,12 +4745,12 @@
4745 ** CAPI3REF: Function Auxiliary Data
4746 **
4747 ** The following two functions may be used by scalar SQL functions to
4748 ** associate metadata with argument values. If the same value is passed to
4749 ** multiple invocations of the same SQL function during query execution, under
4750 ** some circumstances the associated metadata may be preserved. This might
4751 ** be used, for example, in a regular-expression matching
4752 ** function. The compiled version of the regular expression is stored as
4753 ** metadata associated with the SQL value passed as the regular expression
4754 ** pattern. The compiled regular expression can be reused on multiple
4755 ** invocations of the same function so that the original pattern string
4756 ** does not need to be recompiled on each invocation.
@@ -4760,27 +4760,36 @@
4760 ** value to the application-defined function. ^If no metadata has been ever
4761 ** been set for the Nth argument of the function, or if the corresponding
4762 ** function parameter has changed since the meta-data was set,
4763 ** then sqlite3_get_auxdata() returns a NULL pointer.
4764 **
4765 ** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as metadata for the N-th
4766 ** argument of the application-defined function. ^Subsequent
4767 ** calls to sqlite3_get_auxdata(C,N) return P from the most recent
4768 ** sqlite3_set_auxdata(C,N,P,X) call if the data has not been dropped, or
4769 ** NULL if the data has been dropped.
4770 ** ^(If it is not NULL, SQLite will invoke the destructor
4771 ** function X passed to sqlite3_set_auxdata(C,N,P,X) when <ul>
4772 ** <li> the corresponding function parameter changes,
4773 ** <li> [sqlite3_reset()] or [sqlite3_finalize()] is called for the
4774 ** SQL statement,
4775 ** <li> sqlite3_set_auxdata() is invoked again on the same parameter, or
4776 ** <li> a memory allocation error occurs. </ul>)^
4777 **
4778 ** SQLite is free to call the destructor and drop metadata on any
4779 ** parameter of any function at any time. ^The only guarantee is that
4780 ** the destructor will be called when the [prepared statement] is destroyed.
4781 ** Note in particular that the destructor X in the call to
4782 ** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before
4783 ** the sqlite3_set_auxdata() call even returns. Hence sqlite3_set_auxdata()
4784 ** should be called near the end of the function implementation and the
4785 ** implementation should not make any use of P after sqlite3_set_auxdata()
4786 ** has been called.
4787 **
4788 ** ^(In practice, metadata is preserved between function calls for
4789 ** function parameters that are compile-time constants, including literal
4790 ** values and [parameters] and expressions composed from the same.)^
4791 **
4792 ** These routines must be called from the same thread in which
4793 ** the SQL function is running.
4794 */
4795 SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
@@ -110176,11 +110185,12 @@
110185 pWInfo->wctrlFlags = wctrlFlags;
110186 pWInfo->savedNQueryLoop = pParse->nQueryLoop;
110187 pMaskSet = &pWInfo->sMaskSet;
110188 sWLB.pWInfo = pWInfo;
110189 sWLB.pWC = &pWInfo->sWC;
110190 sWLB.pNew = (WhereLoop*)(((char*)pWInfo)+nByteWInfo);
110191 assert( EIGHT_BYTE_ALIGNMENT(sWLB.pNew) );
110192 whereLoopInit(sWLB.pNew);
110193 #ifdef SQLITE_DEBUG
110194 sWLB.pNew->cId = '*';
110195 #endif
110196
110197
+24 -15
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107107
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108108
** [sqlite_version()] and [sqlite_source_id()].
109109
*/
110110
#define SQLITE_VERSION "3.8.0"
111111
#define SQLITE_VERSION_NUMBER 3008000
112
-#define SQLITE_SOURCE_ID "2013-07-17 11:54:47 64bf8148b84e0ebb45c12b629f49bc9b316aceba"
112
+#define SQLITE_SOURCE_ID "2013-07-18 14:50:56 5dcffa671f592ae9355628afa439ae9a2d26f0cd"
113113
114114
/*
115115
** CAPI3REF: Run-Time Library Version Numbers
116116
** KEYWORDS: sqlite3_version, sqlite3_sourceid
117117
**
@@ -4182,12 +4182,12 @@
41824182
** CAPI3REF: Function Auxiliary Data
41834183
**
41844184
** The following two functions may be used by scalar SQL functions to
41854185
** associate metadata with argument values. If the same value is passed to
41864186
** multiple invocations of the same SQL function during query execution, under
4187
-** some circumstances the associated metadata may be preserved. This may
4188
-** be used, for example, to add a regular-expression matching scalar
4187
+** some circumstances the associated metadata may be preserved. This might
4188
+** be used, for example, in a regular-expression matching
41894189
** function. The compiled version of the regular expression is stored as
41904190
** metadata associated with the SQL value passed as the regular expression
41914191
** pattern. The compiled regular expression can be reused on multiple
41924192
** invocations of the same function so that the original pattern string
41934193
** does not need to be recompiled on each invocation.
@@ -4197,27 +4197,36 @@
41974197
** value to the application-defined function. ^If no metadata has been ever
41984198
** been set for the Nth argument of the function, or if the corresponding
41994199
** function parameter has changed since the meta-data was set,
42004200
** then sqlite3_get_auxdata() returns a NULL pointer.
42014201
**
4202
-** ^The sqlite3_set_auxdata() interface saves the metadata
4203
-** pointed to by its 3rd parameter as the metadata for the N-th
4204
-** argument of the application-defined function. Subsequent
4205
-** calls to sqlite3_get_auxdata() might return this data, if it has
4206
-** not been destroyed.
4207
-** ^If it is not NULL, SQLite will invoke the destructor
4208
-** function given by the 4th parameter to sqlite3_set_auxdata() on
4209
-** the metadata when the corresponding function parameter changes
4210
-** or when the SQL statement completes, whichever comes first.
4202
+** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as metadata for the N-th
4203
+** argument of the application-defined function. ^Subsequent
4204
+** calls to sqlite3_get_auxdata(C,N) return P from the most recent
4205
+** sqlite3_set_auxdata(C,N,P,X) call if the data has not been dropped, or
4206
+** NULL if the data has been dropped.
4207
+** ^(If it is not NULL, SQLite will invoke the destructor
4208
+** function X passed to sqlite3_set_auxdata(C,N,P,X) when <ul>
4209
+** <li> the corresponding function parameter changes,
4210
+** <li> [sqlite3_reset()] or [sqlite3_finalize()] is called for the
4211
+** SQL statement,
4212
+** <li> sqlite3_set_auxdata() is invoked again on the same parameter, or
4213
+** <li> a memory allocation error occurs. </ul>)^
42114214
**
42124215
** SQLite is free to call the destructor and drop metadata on any
42134216
** parameter of any function at any time. ^The only guarantee is that
4214
-** the destructor will be called before the metadata is dropped.
4217
+** the destructor will be called when the [prepared statement] is destroyed.
4218
+** Note in particular that the destructor X in the call to
4219
+** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before
4220
+** the sqlite3_set_auxdata() call even returns. Hence sqlite3_set_auxdata()
4221
+** should be called near the end of the function implementation and the
4222
+** implementation should not make any use of P after sqlite3_set_auxdata()
4223
+** has been called.
42154224
**
42164225
** ^(In practice, metadata is preserved between function calls for
4217
-** expressions that are constant at compile time. This includes literal
4218
-** values and [parameters].)^
4226
+** function parameters that are compile-time constants, including literal
4227
+** values and [parameters] and expressions composed from the same.)^
42194228
**
42204229
** These routines must be called from the same thread in which
42214230
** the SQL function is running.
42224231
*/
42234232
SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
42244233
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.8.0"
111 #define SQLITE_VERSION_NUMBER 3008000
112 #define SQLITE_SOURCE_ID "2013-07-17 11:54:47 64bf8148b84e0ebb45c12b629f49bc9b316aceba"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
@@ -4182,12 +4182,12 @@
4182 ** CAPI3REF: Function Auxiliary Data
4183 **
4184 ** The following two functions may be used by scalar SQL functions to
4185 ** associate metadata with argument values. If the same value is passed to
4186 ** multiple invocations of the same SQL function during query execution, under
4187 ** some circumstances the associated metadata may be preserved. This may
4188 ** be used, for example, to add a regular-expression matching scalar
4189 ** function. The compiled version of the regular expression is stored as
4190 ** metadata associated with the SQL value passed as the regular expression
4191 ** pattern. The compiled regular expression can be reused on multiple
4192 ** invocations of the same function so that the original pattern string
4193 ** does not need to be recompiled on each invocation.
@@ -4197,27 +4197,36 @@
4197 ** value to the application-defined function. ^If no metadata has been ever
4198 ** been set for the Nth argument of the function, or if the corresponding
4199 ** function parameter has changed since the meta-data was set,
4200 ** then sqlite3_get_auxdata() returns a NULL pointer.
4201 **
4202 ** ^The sqlite3_set_auxdata() interface saves the metadata
4203 ** pointed to by its 3rd parameter as the metadata for the N-th
4204 ** argument of the application-defined function. Subsequent
4205 ** calls to sqlite3_get_auxdata() might return this data, if it has
4206 ** not been destroyed.
4207 ** ^If it is not NULL, SQLite will invoke the destructor
4208 ** function given by the 4th parameter to sqlite3_set_auxdata() on
4209 ** the metadata when the corresponding function parameter changes
4210 ** or when the SQL statement completes, whichever comes first.
 
 
 
4211 **
4212 ** SQLite is free to call the destructor and drop metadata on any
4213 ** parameter of any function at any time. ^The only guarantee is that
4214 ** the destructor will be called before the metadata is dropped.
 
 
 
 
 
 
4215 **
4216 ** ^(In practice, metadata is preserved between function calls for
4217 ** expressions that are constant at compile time. This includes literal
4218 ** values and [parameters].)^
4219 **
4220 ** These routines must be called from the same thread in which
4221 ** the SQL function is running.
4222 */
4223 SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
4224
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.8.0"
111 #define SQLITE_VERSION_NUMBER 3008000
112 #define SQLITE_SOURCE_ID "2013-07-18 14:50:56 5dcffa671f592ae9355628afa439ae9a2d26f0cd"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
@@ -4182,12 +4182,12 @@
4182 ** CAPI3REF: Function Auxiliary Data
4183 **
4184 ** The following two functions may be used by scalar SQL functions to
4185 ** associate metadata with argument values. If the same value is passed to
4186 ** multiple invocations of the same SQL function during query execution, under
4187 ** some circumstances the associated metadata may be preserved. This might
4188 ** be used, for example, in a regular-expression matching
4189 ** function. The compiled version of the regular expression is stored as
4190 ** metadata associated with the SQL value passed as the regular expression
4191 ** pattern. The compiled regular expression can be reused on multiple
4192 ** invocations of the same function so that the original pattern string
4193 ** does not need to be recompiled on each invocation.
@@ -4197,27 +4197,36 @@
4197 ** value to the application-defined function. ^If no metadata has been ever
4198 ** been set for the Nth argument of the function, or if the corresponding
4199 ** function parameter has changed since the meta-data was set,
4200 ** then sqlite3_get_auxdata() returns a NULL pointer.
4201 **
4202 ** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as metadata for the N-th
4203 ** argument of the application-defined function. ^Subsequent
4204 ** calls to sqlite3_get_auxdata(C,N) return P from the most recent
4205 ** sqlite3_set_auxdata(C,N,P,X) call if the data has not been dropped, or
4206 ** NULL if the data has been dropped.
4207 ** ^(If it is not NULL, SQLite will invoke the destructor
4208 ** function X passed to sqlite3_set_auxdata(C,N,P,X) when <ul>
4209 ** <li> the corresponding function parameter changes,
4210 ** <li> [sqlite3_reset()] or [sqlite3_finalize()] is called for the
4211 ** SQL statement,
4212 ** <li> sqlite3_set_auxdata() is invoked again on the same parameter, or
4213 ** <li> a memory allocation error occurs. </ul>)^
4214 **
4215 ** SQLite is free to call the destructor and drop metadata on any
4216 ** parameter of any function at any time. ^The only guarantee is that
4217 ** the destructor will be called when the [prepared statement] is destroyed.
4218 ** Note in particular that the destructor X in the call to
4219 ** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before
4220 ** the sqlite3_set_auxdata() call even returns. Hence sqlite3_set_auxdata()
4221 ** should be called near the end of the function implementation and the
4222 ** implementation should not make any use of P after sqlite3_set_auxdata()
4223 ** has been called.
4224 **
4225 ** ^(In practice, metadata is preserved between function calls for
4226 ** function parameters that are compile-time constants, including literal
4227 ** values and [parameters] and expressions composed from the same.)^
4228 **
4229 ** These routines must be called from the same thread in which
4230 ** the SQL function is running.
4231 */
4232 SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
4233

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button