summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <antony@ppcg5.local>2007-06-28 13:36:26 -0700
committerunknown <antony@ppcg5.local>2007-06-28 13:36:26 -0700
commit94beb7cd8db07e816ecced8112945d9df9db67e4 (patch)
treeda2f7e222273c732b24ff4cef082448d41d7eb73 /include
parent0e5e884b118baeea9d47520acc5da2caa905dca8 (diff)
downloadmariadb-git-94beb7cd8db07e816ecced8112945d9df9db67e4.tar.gz
Bug#25511
"Federated INSERT failures" Federated does not correctly handle "INSERT...ON DUPLICATE KEY UPDATE" However, implementing such support is not reasonably possible without increasing complexity of the storage engine: checking that constraints on remote server match local server and parsing error messages. This patch causes 'ON DUPLICATE KEY' to fail with ER_DUP_KEY message if a conflict occurs and not to fail silently. include/my_base.h: bug25511 new storage engine hint: HA_EXTRA_INSERT_WITH_UPDATE mysql-test/r/federated.result: test for bug25511 mysql-test/t/federated.test: test for bug25511 sql/ha_federated.cc: bug25511 implement support for handling HA_EXTRA_INSERT_WITH_UPDATE hint sql/ha_federated.h: bug25511 new property: insert_dup_update sql/sql_insert.cc: bug25511 implement support for HA_EXTRA_INSERT_WITH_UPDATE When checking duplicates flag, if it is DUP_UPDATE, send hint to the storage engine.
Diffstat (limited to 'include')
-rw-r--r--include/my_base.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/my_base.h b/include/my_base.h
index d07a4de8e6a..a26217f8050 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -168,7 +168,13 @@ enum ha_extra_function {
These flags are reset by the handler::extra(HA_EXTRA_RESET) call.
*/
HA_EXTRA_DELETE_CANNOT_BATCH,
- HA_EXTRA_UPDATE_CANNOT_BATCH
+ HA_EXTRA_UPDATE_CANNOT_BATCH,
+ /*
+ Inform handler that write_row() should immediately report constraint
+ violations because a INSERT...ON DUPLICATE KEY UPDATE is in being
+ performed.
+ */
+ HA_EXTRA_INSERT_WITH_UPDATE
};
/* The following is parameter to ha_panic() */