summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorKentoku SHIBA <kentokushiba@gmail.com>2017-11-16 11:11:52 +0200
committerMonty <monty@mariadb.org>2017-12-03 13:58:36 +0200
commite53ef202bd7706b88760472472af5ae878065f4f (patch)
treeb4835ec250e0e00d06097da05a28206ca75df75d /sql/opt_sum.cc
parentd1e4ecec07b0611d3d0cbbf53342246ca2c4f600 (diff)
downloadmariadb-git-e53ef202bd7706b88760472472af5ae878065f4f.tar.gz
Adding direct update/delete to the server and to the partition engine.
Add support for direct update and direct delete requests for spider. A direct update/delete request handles all qualified rows in a single operation rather than one row at a time. Contains Spiral patches: 006_mariadb-10.2.0.direct_update_rows.diff MDEV-7704 008_mariadb-10.2.0.partition_direct_update.diff MDEV-7706 010_mariadb-10.2.0.direct_update_rows2.diff MDEV-7708 011_mariadb-10.2.0.aggregate.diff MDEV-7709 027_mariadb-10.2.0.force_bulk_update.diff MDEV-7724 061_mariadb-10.2.0.mariadb-10.1.8.diff MDEV-12870 - The differences compared to the original patches: - Most of the parameters of the new functions are unnecessary. The unnecessary parameters have been removed. - Changed bit positions for new handler flags upon consideration of handler flags not needed by other Spiral patches and handler flags merged from MySQL. - Added info_push() (Was originally part of bulk access patch) - Didn't include code related to handler socket - Added HA_CAN_DIRECT_UPDATE_AND_DELETE Original author: Kentoku SHIBA First reviewer: Jacob Mathew Second reviewer: Michael Widenius
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index 72b28473e15..43d1c2de7ad 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -398,6 +398,8 @@ int opt_sum_query(THD *thd,
const_result= 0;
break;
}
+ longlong info_limit= 1;
+ table->file->info_push(INFO_KIND_FORCE_LIMIT_BEGIN, &info_limit);
if (!(error= table->file->ha_index_init((uint) ref.key, 1)))
error= (is_max ?
get_index_max_value(table, &ref, range_fl) :
@@ -410,6 +412,7 @@ int opt_sum_query(THD *thd,
error= HA_ERR_KEY_NOT_FOUND;
table->file->ha_end_keyread();
table->file->ha_index_end();
+ table->file->info_push(INFO_KIND_FORCE_LIMIT_END, NULL);
if (error)
{
if (error == HA_ERR_KEY_NOT_FOUND || error == HA_ERR_END_OF_FILE)