diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-11-25 18:17:28 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-11-25 18:17:28 +0100 |
commit | 65ca700def99289cc31a7040537f5aa6e12bf485 (patch) | |
tree | 97b3a07299b626c519da0e80c122b5b79b933914 /sql/ha_partition.h | |
parent | 2ab57de38d13d927ddff2d51aed4af34e13998f5 (diff) | |
parent | 6e5bcca7935d3c62f84bb640e5357664a210ee12 (diff) | |
download | mariadb-git-65ca700def99289cc31a7040537f5aa6e12bf485.tar.gz |
merge.
checkpoint.
does not compile.
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r-- | sql/ha_partition.h | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 78f7a2b9662..efd0707252e 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -45,9 +45,8 @@ private: partition_index_first= 1, partition_index_first_unordered= 2, partition_index_last= 3, - partition_index_read_last= 4, - partition_read_range = 5, - partition_no_index_scan= 6 + partition_read_range = 4, + partition_no_index_scan= 5 }; /* Data for the partition handler */ int m_mode; // Open mode @@ -232,6 +231,7 @@ public: DBUG_RETURN(0); } virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share); + bool check_if_supported_virtual_columns(void) { return TRUE;} virtual bool check_if_incompatible_data(HA_CREATE_INFO *create_info, uint table_changes); private: @@ -448,8 +448,6 @@ public: virtual int index_first(uchar * buf); virtual int index_last(uchar * buf); virtual int index_next_same(uchar * buf, const uchar * key, uint keylen); - virtual int index_read_last_map(uchar * buf, const uchar * key, - key_part_map keypart_map); /* read_first_row is virtual method but is only implemented by @@ -1100,6 +1098,29 @@ public: ------------------------------------------------------------------------- virtual void append_create_info(String *packet) */ + + /* + the following heavily relies on the fact that all partitions + are in the same storage engine. + + When this limitation is lifted, the following hack should go away, + and a proper interface for engines needs to be introduced: + + an PARTITION_SHARE structure that has a pointer to the TABLE_SHARE. + is given to engines everywhere where TABLE_SHARE is used now + has members like option_struct, ha_data + perhaps TABLE needs to be split the same way too... + + this can also be done before partition will support a mix of engines, + but preferably together with other incompatible API changes. + */ + virtual handlerton *partition_ht() const + { + handlerton *h= m_file[0]->ht; + for (uint i=1; i < m_tot_parts; i++) + DBUG_ASSERT(h == m_file[i]->ht); + return h; + } }; #endif /* HA_PARTITION_INCLUDED */ |