summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2019-10-14 16:20:16 +0300
committerEugene Kosov <claprix@yandex.ru>2020-02-18 22:53:28 +0300
commit7ccc1710a0dc4dd397905f9488e3c55d91d5ac7b (patch)
tree83467e54e27c4398cf4d41a522b1541a67cfa478 /sql/handler.h
parent5a42a114fdc9cacb6e64b5c61097e7759036b11c (diff)
downloadmariadb-git-7ccc1710a0dc4dd397905f9488e3c55d91d5ac7b.tar.gz
cleanup: key parts comparison
Engine specific code moved to engine.
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h
index 6d675683ada..421941c0b35 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -2936,6 +2936,13 @@ public:
virtual ~Handler_share() {}
};
+enum class Compare_keys : uint32_t
+{
+ Equal,
+ EqualButKeyPartLength,
+ EqualButComment,
+ NotEqual
+};
/**
The handler class is the interface for dynamically loadable
@@ -4877,6 +4884,13 @@ public:
return false;
}
+ /* Used for ALTER TABLE.
+ Some engines can handle some differences in indexes by themself. */
+ virtual Compare_keys compare_key_parts(const Field &old_field,
+ const Column_definition &new_field,
+ const KEY_PART_INFO &old_part,
+ const KEY_PART_INFO &new_part) const;
+
protected:
Handler_share *get_ha_share_ptr();
void set_ha_share_ptr(Handler_share *arg_ha_share);