Re: [gnome-db] IMPACTED_ROWS
- From: Vivien Malerba <vmalerba gmail com>
- To: Piotr Pokora <piotrek pokora gmail com>
- Cc: gnome-db list <gnome-db-list gnome org>
- Subject: Re: [gnome-db] IMPACTED_ROWS
- Date: Wed, 23 Mar 2011 20:22:40 +0100
On 23 March 2011 18:56, Piotr Pokora <piotrek pokora gmail com> wrote:
> Hi!
>
>>>
>>> I propose to add MATCHED_ROW if possible.
>>
>> So the definition of this "returned value" would be: if present, gives
>> the number of rows which would have have been modified but were not
>> because the statement did not modify any value?
>>
>> I can add this for MySQL but I don't think any other database return this
>> value.
>
> Yeah... I think it's so MySQL specific.
>
> But in case of MySQL provider, 0 returned from
> gda_connection_statement_execute_non_select is ambiguous and gda should
> resolve it.
>
> If database provides MATCHED_ROW, set it.
> If not, set it using IMPACTED_ROW value.
The IMPACTED_ROW value should always be there (I don't want any "API break").
So I propose to modify the call to mysql_real_connect() to use the
CLIENT_FOUND_ROWS flag which has the effect that the
mysql_affected_rows() function returns the number of matched rows
instead of the number of the number of modified rows. This way the
IMPACTED_ROW will be like for any other provider.
Is this Ok for you?
>
> Solution like this could nicely work.
> Of course for gda > 4.2
For 4.2.x and 5.x or only for 5.x? If it is considered a correction
then it's for both, otherwise it's only for 5.x. I'd prefer that it be
for 4.2.x and 5.x.
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]