Commit 5352b41d authored by unknown's avatar unknown

Post-merge fix.

parent 532f2e84
...@@ -667,6 +667,7 @@ x 2 90 ...@@ -667,6 +667,7 @@ x 2 90
x 3 30 x 3 30
x NULL 150 x NULL 150
NULL NULL 150 NULL NULL 150
DROP TABLE t1;
CREATE TABLE t1(id int, type char(1)); CREATE TABLE t1(id int, type char(1));
INSERT INTO t1 VALUES INSERT INTO t1 VALUES
(1,"A"),(2,"C"),(3,"A"),(4,"A"),(5,"B"), (1,"A"),(2,"C"),(3,"A"),(4,"A"),(5,"B"),
......
...@@ -728,10 +728,14 @@ class Item_func_rollup_const :public Item_func ...@@ -728,10 +728,14 @@ class Item_func_rollup_const :public Item_func
{ {
public: public:
Item_func_rollup_const(Item *a) :Item_func(a) Item_func_rollup_const(Item *a) :Item_func(a)
{ name= a->name; } {
double val() { return args[0]->val(); } name= a->name;
name_length= a->name_length;
}
double val_real() { return args[0]->val_real(); }
longlong val_int() { return args[0]->val_int(); } longlong val_int() { return args[0]->val_int(); }
String *val_str(String *str) { return args[0]->val_str(str); } String *val_str(String *str) { return args[0]->val_str(str); }
my_decimal *val_decimal(my_decimal *dec) { return args[0]->val_decimal(dec); }
const char *func_name() const { return "rollup_const"; } const char *func_name() const { return "rollup_const"; }
bool const_item() const { return 0; } bool const_item() const { return 0; }
Item_result result_type() const { return args[0]->result_type(); } Item_result result_type() const { return args[0]->result_type(); }
......
...@@ -14571,7 +14571,7 @@ bool JOIN::rollup_init() ...@@ -14571,7 +14571,7 @@ bool JOIN::rollup_init()
Item* new_item= new Item_func_rollup_const(item); Item* new_item= new Item_func_rollup_const(item);
if (!new_item) if (!new_item)
return 1; return 1;
new_item->fix_fields(thd,0, (Item **) 0); new_item->fix_fields(thd, (Item **) 0);
thd->change_item_tree(it.ref(), new_item); thd->change_item_tree(it.ref(), new_item);
for (ORDER *tmp= group_tmp; tmp; tmp= tmp->next) for (ORDER *tmp= group_tmp; tmp; tmp= tmp->next)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment