From b0b0b0fbc4c679f0ae9e0159ad26eb49ae484ab3 Mon Sep 17 00:00:00 2001 From: "antony@ppcg5.local" <> Date: Thu, 28 Jun 2007 13:36:26 -0700 Subject: 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') 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() */ -- cgit v1.2.1