summaryrefslogtreecommitdiff
path: root/sql/item_sum.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-01-26 21:30:35 +0200
committerunknown <bell@sanja.is.com.ua>2003-01-26 21:30:35 +0200
commita72ebebf5dace430460ebdd9e96322780fcfe882 (patch)
treee194c81cba3115272354ebd186e5faa8e278d078 /sql/item_sum.h
parentfbd882fca6902e5038bef1d25c1afbfad892d09a (diff)
downloadmariadb-git-a72ebebf5dace430460ebdd9e96322780fcfe882.tar.gz
after merge fix of 577 task (SCRUM, pre commit to be able to merge with static tables optimization fix)
fixed derived tables with subselect inside mysql-test/r/derived.result: test of subselects inside derived tables mysql-test/t/derived.test: test of subselects inside derived tables mysql-test/t/subselect.test: subselect test (not finished) sql/item.cc: after merge fix sql/item.h: after merge fix sql/item_cmpfunc.h: after merge fix sql/item_subselect.cc: after merge fix sql/item_sum.h: after merge fix sql/mysql_priv.h: fixed derived tables with subselect inside sql/sql_class.h: after merge fix sql/sql_derived.cc: fixed derived tables with subselect inside sql/sql_lex.cc: fixed derived tables with subselect inside sql/sql_lex.h: fixed derived tables with subselect inside sql/sql_parse.cc: fixed derived tables with subselect inside after merge fix sql/sql_prepare.cc: after merge fix sql/sql_select.cc: after merge fix fixed derived tables with subselect inside
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r--sql/item_sum.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h
index 311e7778be6..7f7b5e70f41 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -332,6 +332,22 @@ public:
Item_std_field(Item_sum_std *item);
enum Type type() const { return FIELD_STD_ITEM; }
double val();
+};
+
+/*
+ standard_deviation(a) = sqrt(variance(a))
+*/
+
+class Item_sum_std :public Item_sum_variance
+{
+ public:
+ Item_sum_std(Item *item_par) :Item_sum_variance(item_par){}
+ enum Sumfunctype sum_func () const { return STD_FUNC; }
+ double val();
+ Item *result_item(Field *field)
+ { return new Item_std_field(this); }
+ const char *func_name() const { return "std"; }
+};
// This class is a string or number function depending on num_func