diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-11-28 12:10:44 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-11-28 12:10:44 +0100 |
commit | 1387e71531495b1224bfafd6867ae5fae9cf469c (patch) | |
tree | 6307410443d2eeee3817acf552e3ce583e9444d8 /sql/ha_partition.h | |
parent | 44db9c41b389a2eacdd9591f825ed86e9bffd0e8 (diff) | |
download | mariadb-git-1387e71531495b1224bfafd6867ae5fae9cf469c.tar.gz |
MDEV-5281 Partitioning issue after upgrade from 10.0.3-1 to 10.0.5-1
merged from 5.6:
Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING
Bug#16589511: MYSQL_UPGRADE FAILS TO WRITE OUT ENTIRE ALTER TABLE ... ALGORITHM= ... STATEMENT
Bug#16274455: CAN NOT ACESS PARTITIONED TABLES WHEN DOWNGRADED FROM 5.6.11 TO 5.6.10
plus minor changes from 5.6, mainly comments
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r-- | sql/ha_partition.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 5881ee8b41a..71a82b5af6d 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -24,7 +24,7 @@ enum partition_keywords { PKW_HASH= 0, PKW_RANGE, PKW_LIST, PKW_KEY, PKW_MAXVALUE, PKW_LINEAR, - PKW_COLUMNS + PKW_COLUMNS, PKW_ALGORITHM }; @@ -155,6 +155,7 @@ private: */ KEY *m_curr_key_info[3]; // Current index uchar *m_rec0; // table->record[0] + const uchar *m_err_rec; // record which gave error QUEUE m_queue; // Prio queue used by sorted read /* Since the partition handler is a handler on top of other handlers, it @@ -1188,9 +1189,18 @@ public: virtual bool check_and_repair(THD *thd); virtual bool auto_repair(int error) const; virtual bool is_crashed() const; + virtual int check_for_upgrade(HA_CHECK_OPT *check_opt); private: int handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt, uint flags); + int handle_opt_part(THD *thd, HA_CHECK_OPT *check_opt, uint part_id, + uint flag); + /** + Check if the rows are placed in the correct partition. If the given + argument is true, then move the rows to the correct partition. + */ + int check_misplaced_rows(uint read_part_id, bool repair); + void append_row_to_str(String &str); public: /* |