Commit 2cc5d98c authored by vasil's avatar vasil

branches/5.1:

Merge r2177 from trunk/:

Fix Bug#29157 "UPDATE, changed rows incorrect":

Return HA_ERR_RECORD_IS_THE_SAME from ha_innobase::update_row() if no
columns were updated.
parent 203168fe
...@@ -3775,6 +3775,16 @@ ha_innobase::update_row( ...@@ -3775,6 +3775,16 @@ ha_innobase::update_row(
error = convert_error_code_to_mysql(error, user_thd); error = convert_error_code_to_mysql(error, user_thd);
if (error == 0 /* success */
&& uvect->n_fields == 0 /* no columns were updated */) {
/* This is the same as success, but instructs
MySQL that the row is not really updated and it
should not increase the count of updated rows.
This is fix for http://bugs.mysql.com/29157 */
error = HA_ERR_RECORD_IS_THE_SAME;
}
/* Tell InnoDB server that there might be work for /* Tell InnoDB server that there might be work for
utility threads: */ utility threads: */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment