diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-05-11 16:49:23 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-05-11 16:49:23 +0200 |
commit | a3e8ae12805fb85a0b175b3ccbce36da62f8fdc4 (patch) | |
tree | b72575d93228cb5bf4caa6c25559b3abef8e0d71 /sql/ha_partition.h | |
parent | 8792d8a3acd58b9417ee991166d76ba17f517836 (diff) | |
download | mariadb-git-a3e8ae12805fb85a0b175b3ccbce36da62f8fdc4.tar.gz |
A temporary solution to make CREATE TABLE attributes
to work when a table is partitioned
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r-- | sql/ha_partition.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 98af55bc038..15744b36edb 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -1113,4 +1113,27 @@ 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 (int i=1; i < m_tot_parts; i++) + DBUG_ASSERT(h == m_file[i]->ht); + return h; + } }; |