On 02/23/2016 07:36 PM, E.Pasma wrote:
> 22 feb 2016, Dan Kennedy:
>
>> On 02/23/2016 01:33 AM, E.Pasma wrote:
>>>
>>> I reproduced the memory leak and added a test in the sql script.
>>> An alternative fix, instead of adding the missing break, is:
>>>
>>> case SQLITE_TEXT:
>>> case SQL
23 feb 2016, Dan Kennedy:
> On 02/23/2016 07:36 PM, E.Pasma wrote:
>> 22 feb 2016, Dan Kennedy:
>>
>>> On 02/23/2016 01:33 AM, E.Pasma wrote:
I reproduced the memory leak and added a test in the sql script.
An alternative fix, instead of adding the missing break, is:
22 feb 2016, Dan Kennedy:
> On 02/23/2016 01:33 AM, E.Pasma wrote:
>>
>> I reproduced the memory leak and added a test in the sql script.
>> An alternative fix, instead of adding the missing break, is:
>>
>> case SQLITE_TEXT:
>> case SQLITE_BLOB:
>> pval->n=sqlite3_value_bytes(
On 02/23/2016 01:33 AM, E.Pasma wrote:
>
> I reproduced the memory leak and added a test in the sql script.
> An alternative fix, instead of adding the missing break, is:
>
>case SQLITE_TEXT:
>case SQLITE_BLOB:
> pval->n=sqlite3_value_bytes(arg);
> if (!pval->n) {
Hi,
forget to mention that a function like this was earlier considered as
being tricky and living dangerously.
Also we found a bug (missing break) between line 80 and 81 which will
lead to a memory leak every time a text value is stored ...
switch (pval->t) {
case SQLITE_INTEGER:
21 feb 2016, Igor Tandetnik:
> On 2/21/2016 12:09 PM, Olivier Mascia wrote:
>> Is it possible to implement a SQL function
>> (https://www.sqlite.org/c3ref/create_function.html
>> ), which implementation would be able to return the same value for
>> the duration of the current transaction?
>>
>
n=0;
pval->r=sqlite3_value_double(arg);
break;
}
}
> -Original Message-
> From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-
> bounces at mailinglists.sqlite.org] On Behalf Of E.Pasma
> Sent: Monday, 22 February, 2016
> Le 21 f?vr. 2016 ? 22:35, Keith Medcalf a ?crit :
>
> Of course it is.
>
> The function merely needs to store a value associated with a connection if
> the value does not exist (for that connection) when it is called and use a
> commit_hook and rollback_hook so that it knows when it needs to
Stephan,
> Le 21 f?vr. 2016 ? 18:22, Stephan Beal a ?crit :
>
> This _might_ suffice for you, but maybe not: the SQLITE_DETERMINISTIC flag
> for sqlite3_create_function().
>
> Copied from the header file:
>
>
> ^The fourth parameter may optionally be ORed with [SQLITE_DETERMINISTIC]
> ** to s
On 2/21/16, Olivier Mascia wrote:
>
> The way I had read that documentation is: if your function is meant to be
> deterministic, returning the same result for the very same input, at least
> for the duration of the SQL statement (or of course always), then you should
> tag it as SQLITE_DETERMINIST
On Sun, Feb 21, 2016 at 6:09 PM, Olivier Mascia wrote:
> Dear all,
>
> Is it possible to implement a SQL function (
> https://www.sqlite.org/c3ref/create_function.html), which implementation
> would be able to return the same value for the duration of the current
> transaction?
>
This _might_ su
Dear all,
Is it possible to implement a SQL function
(https://www.sqlite.org/c3ref/create_function.html), which implementation would
be able to return the same value for the duration of the current transaction?
In other words, assume I'd like to implement some function which I could name
'now(
list
> Subject: [sqlite] User-defined SQL functions
>
> Dear all,
>
> Is it possible to implement a SQL function
> (https://www.sqlite.org/c3ref/create_function.html), which implementation
> would be able to return the same value for the duration of the current
> trans
On 2/21/2016 12:09 PM, Olivier Mascia wrote:
> Is it possible to implement a SQL function
> (https://www.sqlite.org/c3ref/create_function.html), which implementation
> would be able to return the same value for the duration of the current
> transaction?
>
> In other words, assume I'd like to imp
14 matches
Mail list logo