summaryrefslogtreecommitdiff
path: root/sql/ha_partition.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r--sql/ha_partition.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index 05262e750f7..71ae84b06a0 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -117,6 +117,8 @@ public:
};
+extern "C" int cmp_key_rowid_part_id(void *ptr, uchar *ref1, uchar *ref2);
+
class ha_partition :public handler
{
private:
@@ -157,6 +159,22 @@ private:
uchar *m_rec0; // table->record[0]
const uchar *m_err_rec; // record which gave error
QUEUE m_queue; // Prio queue used by sorted read
+
+ /*
+ Length of an element in m_ordered_rec_buffer. The elements are composed of
+
+ [part_no] [table->record copy] [underlying_table_rowid]
+
+ underlying_table_rowid is only stored when the table has no extended keys.
+ */
+ uint m_priority_queue_rec_len;
+
+ /*
+ If true, then sorting records by key value also sorts them by their
+ underlying_table_rowid.
+ */
+ bool m_using_extended_keys;
+
/*
Since the partition handler is a handler on top of other handlers, it
is necessary to keep information about what the underlying handler
@@ -1264,6 +1282,9 @@ public:
DBUG_ASSERT(h == m_file[i]->ht);
return h;
}
+
+
+ friend int cmp_key_rowid_part_id(void *ptr, uchar *ref1, uchar *ref2);
};
#endif /* HA_PARTITION_INCLUDED */