Definition of functions for UDFs and plugins. More...
#include <mysql.h>#include <plugin.h>#include <malloc.h>#include <math.h>#include <string.h>

Go to the source code of this file.
Macros | |
| #define | MYSQL_DYNAMIC_PLUGIN 1 |
| #define | NOT_FIXED_DEC 31 |
| Maximum number of digits in double As defined in mysql/sql_string.h. | |
Functions | |
| int | sqlstat_plugin_init (void *p) |
| Initializes plugin. | |
| int | sqlstat_plugin_deinit (void *p) |
| Deinitializes plugin. | |
| int | sqlstat_plugin_isloaded () |
| Check if plugin loaded. More... | |
| my_bool | avgw_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
| Called before first usage of function. More... | |
| 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. More... | |
| void | avgw_clear (UDF_INIT *initid, char *is_null, char *error) |
| Called at start of group. More... | |
| void | avgw_add (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Add a member of the group. More... | |
| double | avgw (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Retrieve weighted average. Called at end of group. More... | |
| void | avgw_deinit (UDF_INIT *initid) |
| Called after last access to function. More... | |
| my_bool | corr_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
| Called before first usage of function. More... | |
| 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. More... | |
| void | corr_clear (UDF_INIT *initid, char *is_null, char *error) |
| Called at start of group. More... | |
| void | corr_add (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Add a member of the group. More... | |
| double | corr (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Retrieve correlation coefficient. Called at end of group. More... | |
| void | corr_deinit (UDF_INIT *initid) |
| Called after last access to function. More... | |
| my_bool | gini_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
| Called before first usage of function. More... | |
| 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. More... | |
| void | gini_clear (UDF_INIT *initid, char *is_null, char *error) |
| Called at start of group. More... | |
| void | gini_add (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Add a member of the group. More... | |
| double | gini (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Retrieve gini. Called at end of group. More... | |
| void | gini_deinit (UDF_INIT *initid) |
| Called after last access to function. More... | |
| my_bool | median_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
| Called before first usage of function. More... | |
| 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. More... | |
| void | median_clear (UDF_INIT *initid, char *is_null, char *error) |
| Called at start of group. More... | |
| void | median_add (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Add a member of the group. More... | |
| double | median (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Retrieve median. Called at end of group. More... | |
| void | median_deinit (UDF_INIT *initid) |
| Called after last access to function. More... | |
| my_bool | rand_mt_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
| Called before first usage of function. More... | |
| double | rand_mt (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Retrieve Mersenne Twister random number. More... | |
| void | rand_mt_deinit (UDF_INIT *initid) |
| Called after last access to function. More... | |
| my_bool | rand_norm_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
| Called before first usage of function. More... | |
| double | rand_norm (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Retrieve a variate of the normal distribution. More... | |
| void | rand_norm_deinit (UDF_INIT *initid) |
| Called after last access to function. More... | |
| my_bool | rownumber_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
| Called before first usage of function. More... | |
| long long | rownumber (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Retrieve row number. More... | |
| void | rownumber_deinit (UDF_INIT *initid) |
| Called after last access to function. More... | |
| my_bool | skewness_pop_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
| Called before first usage of function. More... | |
| 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. More... | |
| void | skewness_pop_clear (UDF_INIT *initid, char *is_null, char *error) |
| Called at start of group. More... | |
| void | skewness_pop_add (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Add a member of the group. More... | |
| 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. More... | |
| void | skewness_pop_deinit (UDF_INIT *initid) |
| Called after last access to function. More... | |
| my_bool | skewness_samp_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
| Called before first usage of function. More... | |
| 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. More... | |
| void | skewness_samp_clear (UDF_INIT *initid, char *is_null, char *error) |
| Called at start of group. More... | |
| void | skewness_samp_add (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Add a member of the group. More... | |
| 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. More... | |
| void | skewness_samp_deinit (UDF_INIT *initid) |
| Called after last access to function. More... | |
| my_bool | stddevw_pop_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
| Called before first usage of function. More... | |
| 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. More... | |
| void | stddevw_pop_clear (UDF_INIT *initid, char *is_null, char *error) |
| Called at start of group. More... | |
| void | stddevw_pop_add (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Add a member of the group. More... | |
| 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. More... | |
| void | stddevw_pop_deinit (UDF_INIT *initid) |
| Called after last access to function. More... | |
| my_bool | stddevw_samp_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
| Called before first usage of function. More... | |
| 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. More... | |
| void | stddevw_samp_clear (UDF_INIT *initid, char *is_null, char *error) |
| Called at start of group. More... | |
| void | stddevw_samp_add (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
| Add a member of the group. More... | |
| 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. More... | |
| void | stddevw_samp_deinit (UDF_INIT *initid) |
| Called after last access to function. More... | |
Definition of functions for UDFs and plugins.
Definition in file sqlstat.h.
| double avgw | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
| void avgw_add | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
| void avgw_clear | ( | UDF_INIT * | initid, |
| char * | is_null, | ||
| char * | error | ||
| ) |
Called at start of group.
void avgw_clear(UDF_INIT *initid, char *is_null, char *error) The sums are cleared.
| initid | function description |
| is_null | |
| error | error message |
Definition at line 108 of file avgw.c.

| void avgw_deinit | ( | UDF_INIT * | initid | ) |
| my_bool avgw_init | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | message | ||
| ) |
| 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.
| initid | function description |
| args | argument values |
| is_null | |
| error | error message |
Definition at line 94 of file avgw.c.

| double corr | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
| void corr_add | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
| void corr_clear | ( | UDF_INIT * | initid, |
| char * | is_null, | ||
| char * | error | ||
| ) |
| void corr_deinit | ( | UDF_INIT * | initid | ) |
| my_bool corr_init | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | message | ||
| ) |
| 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.
| initid | function description |
| args | argument values |
| is_null | |
| error | error message |
Definition at line 99 of file corr.c.

| double gini | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
| void gini_add | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
| void gini_clear | ( | UDF_INIT * | initid, |
| char * | is_null, | ||
| char * | error | ||
| ) |
| void gini_deinit | ( | UDF_INIT * | initid | ) |
| my_bool gini_init | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | message | ||
| ) |
| 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.
| initid | function description |
| args | argument values |
| is_null | |
| error | error message |
Definition at line 115 of file gini.cc.

| double median | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
| void median_add | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
| void median_clear | ( | UDF_INIT * | initid, |
| char * | is_null, | ||
| char * | error | ||
| ) |
| void median_deinit | ( | UDF_INIT * | initid | ) |
| my_bool median_init | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | message | ||
| ) |
| 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.
| initid | function description |
| args | argument values |
| is_null | |
| error | error message |
Definition at line 88 of file median.cc.

| double rand_mt | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
Retrieve Mersenne Twister random number.
A double random number in the range [0,1[ is generated. It has 53 random bits.
| initid | function description |
| args | argument values |
| is_null | result is NULL |
| error | error message |
Definition at line 81 of file rand_mt.cc.

| void rand_mt_deinit | ( | UDF_INIT * | initid | ) |
Called after last access to function.
Deallocate memory for counter and sums.
| initid |
Definition at line 92 of file rand_mt.cc.
| my_bool rand_mt_init | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | message | ||
| ) |
Called before first usage of function.
Checksparameters.
Indicate type of return value.
| initid | function description |
| args | parameters |
| message | error message |
Definition at line 48 of file rand_mt.cc.

| double rand_norm | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
Retrieve a variate of the normal distribution.
The default value for the mean
is 0, the default value of the standard deviation
is 1.
| initid | function description |
| args | argument values |
| is_null | result is NULL |
| error | error message |
Definition at line 84 of file rand_norm.cc.

| void rand_norm_deinit | ( | UDF_INIT * | initid | ) |
Called after last access to function.
| initid |
Definition at line 111 of file rand_norm.cc.
| my_bool rand_norm_init | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | message | ||
| ) |
Called before first usage of function.
Checksparameters.
Indicate type of return value.
| initid | function description |
| args | parameters |
| message | error message |
Definition at line 46 of file rand_norm.cc.

| long long rownumber | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
Retrieve row number.
| initid | function description |
| args | argument values |
| is_null | result is NULL |
| error | error message |
Definition at line 84 of file rownumber.c.
| void rownumber_deinit | ( | UDF_INIT * | initid | ) |
Called after last access to function.
Deallocate memory for counter.
| initid |
Definition at line 104 of file rownumber.c.
| my_bool rownumber_init | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | message | ||
| ) |
Called before first usage of function.
Checksparameters.
Indicate type of return value.
| initid | function description |
| args | parameters |
| message | error message |
Definition at line 51 of file rownumber.c.
| 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.
| initid | function description |
| args | argument values |
| is_null | result is NULL |
| error | error message |
Definition at line 163 of file skewness_pop.c.
| void skewness_pop_add | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
Add a member of the group.
The counter and sums are updated
| initid | function description |
| args | argument values |
| is_null | |
| error | error message |
Definition at line 129 of file skewness_pop.c.

| void skewness_pop_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) The counter and sums are cleared.
| initid | function description |
| is_null | |
| error | error message |
Definition at line 110 of file skewness_pop.c.

| void skewness_pop_deinit | ( | UDF_INIT * | initid | ) |
Called after last access to function.
Deallocate memory for counter and sums.
| initid |
Definition at line 200 of file skewness_pop.c.
| my_bool skewness_pop_init | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | message | ||
| ) |
Called before first usage of function.
Check parameters.
Indicate type of return value.
Allocate memory for counter and sums.
| initid | function description |
| args | parameters |
| message | error message |
Definition at line 57 of file skewness_pop.c.
| 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.
| initid | function description |
| args | argument values |
| is_null | |
| error | error message |
Definition at line 96 of file skewness_pop.c.

| 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.
| initid | function description |
| args | argument values |
| is_null | result is NULL |
| error | error message |
Definition at line 164 of file skewness_samp.c.
| void skewness_samp_add | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
Add a member of the group.
The counter and sums are updated
| initid | function description |
| args | argument values |
| is_null | |
| error | error message |
Definition at line 130 of file skewness_samp.c.

| void skewness_samp_clear | ( | UDF_INIT * | initid, |
| char * | is_null, | ||
| char * | error | ||
| ) |
Called at start of group.
void skewness_samp_clear(UDF_INIT *initid, char *is_null, char *error) The counter and sums are cleared.
| initid | function description |
| is_null | |
| error | error message |
Definition at line 111 of file skewness_samp.c.

| void skewness_samp_deinit | ( | UDF_INIT * | initid | ) |
Called after last access to function.
Deallocate memory for counter and sums.
| initid |
Definition at line 201 of file skewness_samp.c.
| my_bool skewness_samp_init | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | message | ||
| ) |
Called before first usage of function.
Check parameters.
Indicate type of return value.
Allocate memory for counter and sums.
| initid | function description |
| args | parameters |
| message | error message |
Definition at line 58 of file skewness_samp.c.
| 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.
| initid | function description |
| args | argument values |
| is_null | |
| error | error message |
Definition at line 97 of file skewness_samp.c.

| int sqlstat_plugin_isloaded | ( | ) |
Check if plugin loaded.
Definition at line 70 of file sqlplugin.cc.

| 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.
| initid | function description |
| args | argument values |
| is_null | result is NULL |
| error | error message |
Definition at line 160 of file stddevw_pop.c.
| void stddevw_pop_add | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
Add a member of the group.
The counter and sums are updated
| initid | function description |
| args | argument values |
| is_null | |
| error | error message |
Definition at line 127 of file stddevw_pop.c.

| void stddevw_pop_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) The counter and sums are cleared.
| initid | function description |
| is_null | |
| error | error message |
Definition at line 109 of file stddevw_pop.c.

| void stddevw_pop_deinit | ( | UDF_INIT * | initid | ) |
Called after last access to function.
Deallocate memory for counter and sums.
| initid |
Definition at line 190 of file stddevw_pop.c.
| my_bool stddevw_pop_init | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | message | ||
| ) |
Called before first usage of function.
Check parameters.
Indicate type of return value.
Allocate memory for counter and sums.
| initid | function description |
| args | parameters |
| message | error message |
Definition at line 56 of file stddevw_pop.c.
| 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.
| initid | function description |
| args | argument values |
| is_null | |
| error | error message |
Definition at line 95 of file stddevw_pop.c.

| 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.
| initid | function description |
| args | argument values |
| is_null | result is NULL |
| error | error message |
Definition at line 161 of file stddevw_samp.c.
| void stddevw_samp_add | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | is_null, | ||
| char * | error | ||
| ) |
Add a member of the group.
The counter and sums are updated
| initid | function description |
| args | argument values |
| is_null | |
| error | error message |
Definition at line 128 of file stddevw_samp.c.

| void stddevw_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) The counter and sums are cleared.
| initid | function description |
| is_null | |
| error | error message |
Definition at line 110 of file stddevw_samp.c.

| void stddevw_samp_deinit | ( | UDF_INIT * | initid | ) |
Called after last access to function.
Deallocate memory for counter and sums.
| initid |
Definition at line 191 of file stddevw_samp.c.
| my_bool stddevw_samp_init | ( | UDF_INIT * | initid, |
| UDF_ARGS * | args, | ||
| char * | message | ||
| ) |
Called before first usage of function.
Check parameters.
Indicate type of return value.
Allocate memory for counter and sums.
| initid | function description |
| args | parameters |
| message | error message |
Definition at line 57 of file stddevw_samp.c.
| 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.
| initid | function description |
| args | argument values |
| is_null | |
| error | error message |
Definition at line 96 of file stddevw_samp.c.

1.8.8