public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* sqlite3: deprecated declarations
@ 2016-09-02  6:24 Yaakov Selkowitz
  2016-09-02  9:12 ` Jan Nijtmans
  0 siblings, 1 reply; 4+ messages in thread
From: Yaakov Selkowitz @ 2016-09-02  6:24 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sqlite3: deprecated declarations
  2016-09-02  6:24 sqlite3: deprecated declarations Yaakov Selkowitz
@ 2016-09-02  9:12 ` Jan Nijtmans
  2017-04-21 11:51   ` Yaakov Selkowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Nijtmans @ 2016-09-02  9:12 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sqlite3: deprecated declarations
  2016-09-02  9:12 ` Jan Nijtmans
@ 2017-04-21 11:51   ` Yaakov Selkowitz
  2017-04-25 17:52     ` Jan Nijtmans
  0 siblings, 1 reply; 4+ messages in thread
From: Yaakov Selkowitz @ 2017-04-21 11:51 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sqlite3: deprecated declarations
  2017-04-21 11:51   ` Yaakov Selkowitz
@ 2017-04-25 17:52     ` Jan Nijtmans
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Nijtmans @ 2017-04-25 17:52 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-25 10:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-02  6:24 sqlite3: deprecated declarations Yaakov Selkowitz
2016-09-02  9:12 ` Jan Nijtmans
2017-04-21 11:51   ` Yaakov Selkowitz
2017-04-25 17:52     ` Jan Nijtmans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).