mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
add VARIANCE function
This commit is contained in:
@ -3773,13 +3773,14 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
|
||||
else
|
||||
return new Field_double(item_sum->max_length,maybe_null,
|
||||
item->name, table, item_sum->decimals);
|
||||
case Item_sum::STD_FUNC: /* Place for sum & count */
|
||||
case Item_sum::VARIANCE_FUNC: /* Place for sum & count */
|
||||
case Item_sum::STD_FUNC:
|
||||
if (group)
|
||||
return new Field_string(sizeof(double)*2+sizeof(longlong),
|
||||
maybe_null, item->name,table,my_charset_bin);
|
||||
else
|
||||
return new Field_double(item_sum->max_length, maybe_null,
|
||||
item->name,table,item_sum->decimals);
|
||||
item->name,table,item_sum->decimals);
|
||||
case Item_sum::UNIQUE_USERS_FUNC:
|
||||
return new Field_long(9,maybe_null,item->name,table,1);
|
||||
default:
|
||||
|
Reference in New Issue
Block a user