summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorunknown <dlenev@jabberwock.site>2006-07-07 14:11:35 +0400
committerunknown <dlenev@jabberwock.site>2006-07-07 14:11:35 +0400
commit78942270ed45622022b92b576d980bbebaa1ac6c (patch)
tree47eb9f0c5cf5a4c4f60bdc8a57693bf24b1d5cee /sql/ha_partition.cc
parent89e2fba47fd11705082a38cff8a709f8da79c1d8 (diff)
parent0e47753ffd450d7df9968e6365ec6ad3eca8724b (diff)
downloadmariadb-git-78942270ed45622022b92b576d980bbebaa1ac6c.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into jabberwock.site:/home/dlenev/mysql-5.1-bg18437 sql/ha_ndbcluster.cc: Auto merged sql/ha_partition.cc: Auto merged sql/log_event.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_trigger.cc: Auto merged sql/sql_update.cc: Auto merged sql/table.cc: Auto merged sql/sql_table.cc: Manual merge.
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index c0257e08537..037f6e0b8bb 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -4666,6 +4666,27 @@ int ha_partition::extra(enum ha_extra_function operation)
*/
break;
}
+ case HA_EXTRA_WRITE_CAN_REPLACE:
+ case HA_EXTRA_WRITE_CANNOT_REPLACE:
+ {
+ /*
+ Informs handler that write_row() can replace rows which conflict
+ with row being inserted by PK/unique key without reporting error
+ to the SQL-layer.
+
+ This optimization is not safe for partitioned table in general case
+ since we may have to put new version of row into partition which is
+ different from partition in which old version resides (for example
+ when we partition by non-PK column or by some column which is not
+ part of unique key which were violated).
+ And since NDB which is the only engine at the moment that supports
+ this optimization handles partitioning on its own we simple disable
+ it here. (BTW for NDB this optimization is safe since it supports
+ only KEY partitioning and won't use this optimization for tables
+ which have additional unique constraints).
+ */
+ break;
+ }
default:
{
/* Temporary crash to discover what is wrong */