Re: [gnome-db] IMPACTED_ROWS
- From: Piotr Pokora <piotrek pokora gmail com>
- To: Vivien Malerba <vmalerba gmail com>
- Cc: gnome-db list <gnome-db-list gnome org>
- Subject: Re: [gnome-db] IMPACTED_ROWS
- Date: Wed, 23 Mar 2011 18:10:57 +0100
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.
] [Thread Prev