summaryrefslogtreecommitdiff
path: root/sql/my_decimal.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-10-15 13:50:41 +0400
committerAlexander Barkov <bar@mariadb.com>2019-10-15 15:30:18 +0400
commit22b645ef5292387871b12b26fd550eed6e57aa2d (patch)
tree15eec65381faa46d6181c84d25166db471e1b249 /sql/my_decimal.h
parent8ec978142b1572f54ce8b1afc71a68e924c089f4 (diff)
downloadmariadb-git-22b645ef5292387871b12b26fd550eed6e57aa2d.tar.gz
MDEV-20831 Table partitioned by LIST/RANGE COLUMNS(inet6) can be created, but not inserted into
This clause in CREATE TABLE: PARTITION BY LIST COLUMNS (inet6column) (PARTITION p1 VALUES IN ('::')) was erroneously written to frm file as: PARTITION BY LIST COLUMNS(inet6column) (PARTITION p1 VALUES IN (_binary 0x3A3A)) I.e. the text value '::' was converted to HEX representation and prefixed with _binary. A simple fix could write `_latin1 0x3A3A` instead of `_binary 0x3A3A`, but in case of INET6 we don't need neither character set introducers, nor HEX encoding, because text representation of INET6 values consist of pure ASCII characters. So this patch changes the above clause to be printed as: PARTITION BY LIST COLUMNS(inet6column) (PARTITION p1 VALUES IN ('::')) Details: The old code in check_part_field() was not friendly to pluggable data types. Replacing this function to two new virtual methods in Type_handler: virtual bool partition_field_check(const LEX_CSTRING &field_name, Item *item_expr) const; virtual bool partition_field_append_value(String *str, Item *item_expr, CHARSET_INFO *field_cs, partition_value_print_mode_t mode) const; so data type plugins can decide whether they need to use character set introducer and/or hex encoding when printing partition values.
Diffstat (limited to 'sql/my_decimal.h')
0 files changed, 0 insertions, 0 deletions