Hi!
>>>>> "David" == David Chippington <david@stripped> writes:
David> Monty,
David> Not UDFs but procedures (unless I can use all values from a column in a UDF
David> rather than one value at time?).
No, UDF's only works like a simple function, you can't do anything
advanced with this.
David> There is an example called analyse but no documentation on getting mysql to
David> recognise it.
analyse is enabled by default.
David> Any ideas ?
Sorry, but we don't have any other documentation for this than the
files:
sql/sql_analyse.cc
sql/procedure.h
sql/procedure.cc
To let the functions known to MySQL, you have to add one row to the
sql_procs[] variable in sql/procedure.cc:
Here is how analyse is defined:
---------
static struct st_procedure_def {
const char *name;
Procedure *(*init)(THD *thd,ORDER *param,select_result *result,
List<Item> &field_list);
} sql_procs[] = {
#ifdef USE_PROC_RANGE
{ "split_sum",proc_sum_range_init }, // Internal procedure at TCX
{ "split_count",proc_count_range_init }, // Internal procedure at TCX
{ "matris_ranges",proc_matris_range_init }, // Internal procedure at TCX
#endif
{ "analyse",proc_analyse_init } // Analyse a result
};
----------
Regards,
Monty
| Thread |
|---|
| • Procedures | David Chippington | 28 Sep |
| • Procedures | Michael Widenius | 29 Sep |
| • Re: Procedures | Michael Widenius | 2 Oct |