Commit 3d1d4b87 authored by Monty's avatar Monty

MDEV-7700 Spiral patch 002_mariadb-10.0.15.spider.diff

- Enable HA_EXTRA_WRITE_CAN_REPLACE and HA_EXTRA_WRITE_CANNOT_REPLACE for
  partition engine.
parent 25a1fdd1
...@@ -7237,18 +7237,9 @@ int ha_partition::extra(enum ha_extra_function operation) ...@@ -7237,18 +7237,9 @@ int ha_partition::extra(enum ha_extra_function operation)
with row being inserted by PK/unique key without reporting error with row being inserted by PK/unique key without reporting error
to the SQL-layer. to the SQL-layer.
This optimization is not safe for partitioned table in general case At this time, this is safe by limitation of ha_partition
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; DBUG_RETURN(loop_extra(operation));
} }
/* Category 7), used by federated handlers */ /* Category 7), used by federated handlers */
case HA_EXTRA_INSERT_WITH_UPDATE: case HA_EXTRA_INSERT_WITH_UPDATE:
......
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