summaryrefslogtreecommitdiff
path: root/sql/sql_priv.h
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2019-06-17 16:54:47 +0300
committerEugene Kosov <claprix@yandex.ru>2019-06-22 14:09:12 +0300
commita82e42fd133949b560790c9b74a4072f899baee4 (patch)
tree644d04d14fd58e03105fb486f0e90eb29ce136d1 /sql/sql_priv.h
parent854c219a7f0e1878517d5a821992f650342380dd (diff)
downloadmariadb-git-a82e42fd133949b560790c9b74a4072f899baee4.tar.gz
NFC: refactor Field::is_equal() and related stuff
Make Field::is_equal() const and return bool as it's a naturally fitting type for it. Also it's agrument was narrowed to Column_definition. InnoDB can change type of some columns by itself. InnoDB-specific code used to reside in Field_xxx:is_equal() methods. Now engine-specific stuff was moved to a virtual methods of handler::can_convert{string,varstring,blob,geom}. These methods are called by Field::can_be_converted_by_engine() which is a double dispatch pattern. Some InnoDB-specific code still resides in compare_keys_but_name(). It should be moved from here someday to handler::compare_key_parts(...) or similar. IS_EQUAL_WITH_REINTERPRET_COMPATIBLE_CHARSET IS_EQUAL_WITH_REINTERPRET_COMPATIBLE_CHARSET_BUT_COLLATE: both was removed IS_EQUAL_NO, IS_EQUAL_YES are not needed now and should be removed along with deprecated handler::check_if_incompatible_data(). HA_EXTENDED_TYPES_CONVERSION: was removed as such logic is not needed now by server code. ALTER_COLUMN_EQUAL_PACK_LENGTH: was renamed to a more generic ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE
Diffstat (limited to 'sql/sql_priv.h')
-rw-r--r--sql/sql_priv.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/sql/sql_priv.h b/sql/sql_priv.h
index 0b06985f431..0d1c9881c17 100644
--- a/sql/sql_priv.h
+++ b/sql/sql_priv.h
@@ -354,14 +354,6 @@
data dictionary without changing table rows
*/
#define IS_EQUAL_PACK_LENGTH 2
-/**
- charsets are the same or compatible, collates are the same, the rest is equal
-*/
-#define IS_EQUAL_WITH_REINTERPRET_COMPATIBLE_CHARSET 3
-/**
- charsets are the same or compatible, collates are different, the rest is equal
-*/
-#define IS_EQUAL_WITH_REINTERPRET_COMPATIBLE_CHARSET_BUT_COLLATE 4
enum enum_parsing_place
{