summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/ha_partition.cc11
-rw-r--r--sql/ha_partition.h1
-rw-r--r--sql/handler.h2
3 files changed, 13 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 615c4bfb1bf..b0580d784b0 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -1579,6 +1579,17 @@ void ha_partition::update_create_info(HA_CREATE_INFO *create_info)
}
+void ha_partition::change_table_ptr(TABLE *table_arg, TABLE_SHARE *share)
+{
+ handler **file_array= m_file;
+ table= table_arg;
+ table_share= share;
+ do
+ {
+ (*file_array)->change_table_ptr(table_arg, share);
+ } while (*(++file_array));
+}
+
/*
Change comments specific to handler
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index c62f21cfaa1..403a94a0c24 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -199,6 +199,7 @@ public:
*no_parts= m_tot_parts;
DBUG_RETURN(0);
}
+ virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share);
private:
int prepare_for_delete();
int copy_partitions(ulonglong *copied, ulonglong *deleted);
diff --git a/sql/handler.h b/sql/handler.h
index 201a2f1980a..523a5db5356 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -983,7 +983,7 @@ public:
virtual void print_error(int error, myf errflag);
virtual bool get_error_message(int error, String *buf);
uint get_dup_key(int error);
- void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share)
+ virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share)
{
table= table_arg;
table_share= share;