MyFirstUDRKit/sql/MyFirstUDRKit.sql

24 lines
539 B
MySQL
Raw Normal View History

2023-01-23 15:31:32 +01:00
/*
* This demonstrates how to declare the UDRs globally
*/
create or alter function div (
anumerator integer, adenominator integer
)
returns double precision
external name 'udf_compat!UC_div!Divide anumerator by adenominator' engine udr;
2023-01-24 15:58:30 +01:00
2023-01-23 15:31:32 +01:00
create or alter function flagged (
flags integer, flag integer
)
returns integer
external name 'my_first_udr_kit!MFK_flagged!How is this function used?' engine udr;
2023-01-24 15:58:30 +01:00
2023-01-23 15:43:39 +01:00
-- Add some grants here perhaps?
grant execute on function div to public;
grant execute on function flagged to public;