summaryrefslogtreecommitdiff
path: root/include/my_base.h
diff options
context:
space:
mode:
authorgkodinov/kgeorge@magare.gmz <>2007-06-28 16:07:55 +0300
committergkodinov/kgeorge@magare.gmz <>2007-06-28 16:07:55 +0300
commit71aaf52a2f8da334fc0b95c01bdfa8a5e5f602cb (patch)
treea2bf9e1b332e76cb81626a4f4952dfcd1f7eed99 /include/my_base.h
parent960f8c02c89a0ed54f4d7edbc0695161726a9576 (diff)
downloadmariadb-git-71aaf52a2f8da334fc0b95c01bdfa8a5e5f602cb.tar.gz
Bug #29157: UPDATE, changed rows incorrect
Sometimes the number of really updated rows (with changed column values) cannot be determined at the server level alone (e.g. if the storage engine does not return enough column values to verify that). So the only dependable way in such cases is to let the storage engine return that information if possible. Fixed the bug at server level by providing a way for the storage engine to return information about wether it actually updated the row or the old and the new column values are the same. It can do that by returning HA_ERR_RECORD_IS_THE_SAME in ha_update_row(). Note that each storage engine may choose not to try to return this status code, so this behaviour remains storage engine specific.
Diffstat (limited to 'include/my_base.h')
-rw-r--r--include/my_base.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/my_base.h b/include/my_base.h
index 617cdb8c3f0..b2a8b4b6b67 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -396,7 +396,9 @@ enum ha_base_keytype {
#define HA_ERR_AUTOINC_READ_FAILED 166 /* Failed to get next autoinc value */
#define HA_ERR_AUTOINC_ERANGE 167 /* Failed to set row autoinc value */
#define HA_ERR_GENERIC 168 /* Generic error */
-#define HA_ERR_LAST 168 /*Copy last error nr.*/
+#define HA_ERR_RECORD_IS_THE_SAME 169 /* row not actually updated :
+ new values same as the old values */
+#define HA_ERR_LAST 169 /*Copy last error nr.*/
/* Add error numbers before HA_ERR_LAST and change it accordingly. */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)