summaryrefslogtreecommitdiff
path: root/sql/item_sum.h
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2003-01-26 21:30:35 +0200
committerbell@sanja.is.com.ua <>2003-01-26 21:30:35 +0200
commit760e22f0bb9e288e1730958adf0f47343d89474a (patch)
treee194c81cba3115272354ebd186e5faa8e278d078 /sql/item_sum.h
parent44d8a8cdab59afcda96379d490a24a314367fde8 (diff)
downloadmariadb-git-760e22f0bb9e288e1730958adf0f47343d89474a.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
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