63 #define MYSQL_DYNAMIC_PLUGIN 1
77 #define NOT_FIXED_DEC 31
78 #endif // NOT_FIXED_DEC
90 my_bool
avgw_init(UDF_INIT *initid, UDF_ARGS *args,
char *message);
91 void avgw_reset(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
92 void avgw_clear(UDF_INIT *initid,
char *is_null,
char *error);
93 void avgw_add(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
94 double avgw(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
97 my_bool
corr_init(UDF_INIT *initid, UDF_ARGS *args,
char *message);
98 void corr_reset(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
99 void corr_clear(UDF_INIT *initid,
char *is_null,
char *error);
100 void corr_add(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
101 double corr(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
104 my_bool
gini_init(UDF_INIT *initid, UDF_ARGS *args,
char *message);
105 void gini_reset(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
106 void gini_clear(UDF_INIT *initid,
char *is_null,
char *error);
107 void gini_add(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
108 double gini(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
111 my_bool
median_init(UDF_INIT *initid, UDF_ARGS *args,
char *message);
112 void median_reset(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
113 void median_clear(UDF_INIT *initid,
char *is_null,
char *error);
114 void median_add(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
115 double median(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
118 my_bool
rand_mt_init(UDF_INIT *initid, UDF_ARGS *args,
char *message);
119 double rand_mt(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
122 my_bool
rand_norm_init(UDF_INIT *initid, UDF_ARGS *args,
char *message);
123 double rand_norm(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
126 my_bool
rownumber_init(UDF_INIT *initid, UDF_ARGS *args,
char *message);
127 long long rownumber(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
131 void skewness_pop_reset(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
133 void skewness_pop_add(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
134 double skewness_pop(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
140 void skewness_samp_add(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
141 double skewness_samp(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
145 void stddevw_pop_reset(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
147 void stddevw_pop_add(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
148 double stddevw_pop(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
152 void stddevw_samp_reset(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
154 void stddevw_samp_add(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
155 double stddevw_samp(UDF_INIT *initid, UDF_ARGS *args,
char *is_null,
char *error);
void skewness_samp_add(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Add a member of the group.
void avgw_add(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Add a member of the group.
void gini_reset(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Reset function and add first group member Calls clear and add.
void avgw_deinit(UDF_INIT *initid)
Called after last access to function.
double corr(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Retrieve correlation coefficient. Called at end of group.
void stddevw_pop_add(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Add a member of the group.
void avgw_reset(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Reset function and add first group member Calls clear and add.
void rownumber_deinit(UDF_INIT *initid)
Called after last access to function.
void stddevw_samp_deinit(UDF_INIT *initid)
Called after last access to function.
double stddevw_pop(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Retrieve weighted standard deviation of population. Called at end of group.
void corr_clear(UDF_INIT *initid, char *is_null, char *error)
Called at start of group.
void stddevw_pop_deinit(UDF_INIT *initid)
Called after last access to function.
void stddevw_samp_reset(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Reset function and add first group member Calls clear and add.
void corr_deinit(UDF_INIT *initid)
Called after last access to function.
void gini_add(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Add a member of the group.
void stddevw_pop_reset(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Reset function and add first group member Calls clear and add.
void corr_add(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Add a member of the group.
double rand_norm(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Retrieve a variate of the normal distribution.
double skewness_pop(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Retrieve population moment coefficient of skewness. Called at end of group.
my_bool skewness_pop_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
Called before first usage of function.
my_bool gini_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
Called before first usage of function.
void skewness_pop_add(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Add a member of the group.
void median_reset(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Reset function and add first group member Calls clear and add.
my_bool median_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
Called before first usage of function.
int sqlstat_plugin_init(void *p)
Initializes plugin.
my_bool skewness_samp_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
Called before first usage of function.
void skewness_pop_deinit(UDF_INIT *initid)
Called after last access to function.
void skewness_samp_deinit(UDF_INIT *initid)
Called after last access to function.
double gini(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Retrieve gini. Called at end of group.
int sqlstat_plugin_deinit(void *p)
Deinitializes plugin.
void gini_clear(UDF_INIT *initid, char *is_null, char *error)
Called at start of group.
void stddevw_pop_clear(UDF_INIT *initid, char *is_null, char *error)
Called at start of group.
double avgw(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Retrieve weighted average. Called at end of group.
my_bool rand_mt_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
Called before first usage of function.
void skewness_pop_reset(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Reset function and add first group member Calls clear and add.
my_bool corr_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
Called before first usage of function.
int sqlstat_plugin_isloaded()
Check if plugin loaded.
void stddevw_samp_add(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Add a member of the group.
void skewness_samp_clear(UDF_INIT *initid, char *is_null, char *error)
Called at start of group.
void stddevw_samp_clear(UDF_INIT *initid, char *is_null, char *error)
Called at start of group.
void rand_mt_deinit(UDF_INIT *initid)
Called after last access to function.
my_bool stddevw_pop_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
Called before first usage of function.
double rand_mt(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Retrieve Mersenne Twister random number.
void skewness_samp_reset(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Reset function and add first group member Calls clear and add.
void median_add(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Add a member of the group.
my_bool rownumber_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
Called before first usage of function.
void median_deinit(UDF_INIT *initid)
Called after last access to function.
void corr_reset(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Reset function and add first group member Calls clear and add.
void rand_norm_deinit(UDF_INIT *initid)
Called after last access to function.
void avgw_clear(UDF_INIT *initid, char *is_null, char *error)
Called at start of group.
double median(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Retrieve median. Called at end of group.
long long rownumber(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Retrieve row number.
double skewness_samp(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Retrieve sample moment coefficient of skewness. Called at end of group.
double stddevw_samp(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
Retrieve weighted standard deviation of sample. Called at end of group.
void median_clear(UDF_INIT *initid, char *is_null, char *error)
Called at start of group.
void skewness_pop_clear(UDF_INIT *initid, char *is_null, char *error)
Called at start of group.
my_bool rand_norm_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
Called before first usage of function.
void gini_deinit(UDF_INIT *initid)
Called after last access to function.
my_bool avgw_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
Called before first usage of function.
my_bool stddevw_samp_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
Called before first usage of function.