sqlite3: deprecated declarations

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

sqlite3: deprecated declarations

Yaakov Selkowitz
Jan,

Please enable deprecated declarations in sqlite3.h.  While it's nice in
theory to say that they are deprecated and shouldn't be used, the
reality is that real-world code still uses them and therefore fails to
build as-is without them.

TIA,

--
Yaakov

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: sqlite3: deprecated declarations

Jan Nijtmans-2
2016-09-02 8:23 GMT+02:00 Yaakov Selkowitz:
> Jan,
>
> Please enable deprecated declarations in sqlite3.h.  While it's nice in
> theory to say that they are deprecated and shouldn't be used, the reality is
> that real-world code still uses them and therefore fails to build as-is
> without them.

Thanks!  I'll do that in the next build. Still, I'm interested to know
which real-word code still uses it, so a bug-report can be sent
to them. All of those 6 functions where deprecated for a reason!

SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
** This function is deprecated.  Do not use it for new code.  It is
** provide only to avoid breaking legacy code.  New aggregate function
** implementations should keep their own counts within their aggregate
** context.

SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
** Return TRUE (non-zero) of the statement supplied as an argument needs
** to be recompiled.  A statement needs to be recompiled whenever the
** execution environment changes in a way that would alter the program
** that sqlite3_prepare() generates.  For example, if new functions or
** collating sequences are registered or if an authorizer function is
** added or changed.

SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
** Deprecated external interface.  Internal/core SQLite code
** should call sqlite3TransferBindings.
**
** It is misuse to call this routine with statements from different
** database connections.  But as this is a deprecated interface, we
** will not bother to check for that condition.
**
** If the two statements contain a different number of bindings, then
** an SQLITE_ERROR is returned.  Nothing else can go wrong, so otherwise
** SQLITE_OK is returned.

SQLITE_DEPRECATED int sqlite3_global_recover(void);
** This function is now an anachronism. It used to be used to recover from a
** malloc() failure, but SQLite now does this automatically.

SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
** This is a convenience routine that makes sure that all thread-specific
** data for this thread has been deallocated.
**
** SQLite no longer uses thread-specific data so this routine is now a
** no-op.  It is retained for historical compatibility.

SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
                      void*,sqlite3_int64);
** Deprecated external interface.  It used to set an alarm callback
** that was invoked when memory usage grew too large.  Now it is a
** no-op.



Regards,
       Jan Nijtmans

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: sqlite3: deprecated declarations

Yaakov Selkowitz
On 2016-09-02 04:12, Jan Nijtmans wrote:
> 2016-09-02 8:23 GMT+02:00 Yaakov Selkowitz:
>> Please enable deprecated declarations in sqlite3.h.  While it's nice in
>> theory to say that they are deprecated and shouldn't be used, the reality is
>> that real-world code still uses them and therefore fails to build as-is
>> without them.
>
> Thanks!  I'll do that in the next build.

Ping?  This is still an issue with 3.16.2-1.

> Still, I'm interested to know
> which real-word code still uses it, so a bug-report can be sent
> to them. All of those 6 functions where deprecated for a reason!
>
> SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);

PHP's pdo_sqlite uses this.

> SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);

qt*-webkit and webkitgtk use this.

> SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);

Python's sqlite3 extension uses this.

> SQLITE_DEPRECATED int sqlite3_global_recover(void);
> SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
> SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
>                       void*,sqlite3_int64);

I'm not aware of anything using these.

--
Yaakov

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: sqlite3: deprecated declarations

Jan Nijtmans-2
2017-04-21 9:57 GMT+02:00 Yaakov Selkowitz:
>>> Please enable deprecated declarations in sqlite3.h.
> Ping?  This is still an issue with 3.16.2-1.

I now made this change in the local 3.19 code (3.18 is uploaded already),
so next build the deprecated functions will be back in the headers.

>> Still, I'm interested to know
>> which real-word code still uses it, so a bug-report can be sent
>> to them. All of those 6 functions where deprecated for a reason!
>>
>> SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
>
>
> PHP's pdo_sqlite uses this.
>
>> SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
>
>
> qt*-webkit and webkitgtk use this.
>
>> SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*,
>> sqlite3_stmt*);
>
>
> Python's sqlite3 extension uses this.
>
>> SQLITE_DEPRECATED int sqlite3_global_recover(void);
>> SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
>> SQLITE_DEPRECATED int
>> sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
>>                       void*,sqlite3_int64);
>
>
> I'm not aware of anything using these.

Thanks for this information, that's indeed what I was waiting for. For
example Python should be aware that the functions sqlite3_global_recover(),
sqlite3_thread_cleanup() and sqlite3_memory_alarm() in sqlite are
dummy functions doing nothing, any code using them is simply obsolete.

I'll see what I can do about this, reporting this upstream would be the least.

Thanks!
     Jan Nijtmans

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple