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 18:27:59 +0100
On 23 March 2011 18:10, Piotr Pokora <piotrek pokora gmail com> wrote:
> Hi!
>
>> So either you have a MySQL server version which I need to handle
>> correctly in Libgda or you have a database structure which makes MySQL
>> to behave differently, or you have some kind of weird SQL?
>
> Resolved that, finally.
> When MySQL performs UPDATE query, it returns numbers of affected rows only
> (and only) if record has been actually changed. I was sure, I run the query
> which updates record with different values.
>
> When I ran it in MySQL prompt I noticed:
>
> 0 rows affected
> Rows matched: 1
>
> So libgda does correct thing returning 0 in my case.
> But some hint is required IMO, anyway.
> One doesn't know if 0 means "no matching row" or "row is the same".
>
> 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.
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]