summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-03-18 15:33:59 +0400
committerAlexander Barkov <bar@mariadb.com>2019-03-18 15:33:59 +0400
commit3b98c65c4e8b50b3000cbca643a5d3048cf1f7f7 (patch)
tree229ac6510d1571de247850cd5e63fd4d805e740c /sql/item_strfunc.h
parent6c08174e365c1a2db76e51dedd2a8292464472d6 (diff)
downloadmariadb-git-3b98c65c4e8b50b3000cbca643a5d3048cf1f7f7.tar.gz
MDEV-18881 Assertion `0' failed in make_sortkey upon SELECT with GROUP BY after LOAD DATA
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 49faed2fec1..ace246bc271 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -823,26 +823,33 @@ public:
};
-class Item_func_rpad :public Item_str_func
+class Item_func_pad: public Item_str_func
{
- String tmp_value, rpad_str;
+protected:
+ String tmp_value, pad_str;
public:
- Item_func_rpad(THD *thd, Item *arg1, Item *arg2, Item *arg3):
+ Item_func_pad(THD *thd, Item *arg1, Item *arg2, Item *arg3):
Item_str_func(thd, arg1, arg2, arg3) {}
- String *val_str(String *);
void fix_length_and_dec();
+};
+
+
+class Item_func_rpad :public Item_func_pad
+{
+public:
+ Item_func_rpad(THD *thd, Item *arg1, Item *arg2, Item *arg3):
+ Item_func_pad(thd, arg1, arg2, arg3) {}
+ String *val_str(String *);
const char *func_name() const { return "rpad"; }
};
-class Item_func_lpad :public Item_str_func
+class Item_func_lpad :public Item_func_pad
{
- String tmp_value, lpad_str;
public:
Item_func_lpad(THD *thd, Item *arg1, Item *arg2, Item *arg3):
- Item_str_func(thd, arg1, arg2, arg3) {}
+ Item_func_pad(thd, arg1, arg2, arg3) {}
String *val_str(String *);
- void fix_length_and_dec();
const char *func_name() const { return "lpad"; }
};