summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-04-17 20:21:11 +0400
committerAlexander Barkov <bar@mariadb.com>2019-04-17 20:21:11 +0400
commit0bb924e18c338fa2dc901041aad09998b399efc1 (patch)
tree1d085472927f26a89d656a87d0ff3982958fa2de /sql
parent409dddf6958736d65ee77aa9b469f8b807da3bb1 (diff)
downloadmariadb-git-0bb924e18c338fa2dc901041aad09998b399efc1.tar.gz
MDEV-17830 Server crashes in Item_null_result::field_type upon SELECT with CHARSET(date) and ROLLUP
Diffstat (limited to 'sql')
-rw-r--r--sql/item.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index 75ebcdb624c..4b93d3f9164 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -2618,6 +2618,10 @@ public:
{
return result_field->type();
}
+ CHARSET_INFO *charset_for_protocol(void) const
+ {
+ return collation.collation;
+ }
#else
const Type_handler *type_handler() const
{
@@ -3942,6 +3946,12 @@ public:
void save_org_in_field(Field *field, fast_field_copier optimizer_data);
fast_field_copier setup_fast_field_copier(Field *field)
{ return (*ref)->setup_fast_field_copier(field); }
+#if MARIADB_VERSION_ID < 100300
+ CHARSET_INFO *charset_for_protocol(void) const
+ {
+ return (*ref)->charset_for_protocol();
+ }
+#endif
enum Item_result result_type () const { return (*ref)->result_type(); }
enum_field_types field_type() const { return (*ref)->field_type(); }
Field *get_tmp_table_field()