2014-12-16 15:31:25 +04:00
|
|
|
--source include/have_udf.inc
|
|
|
|
|
2014-12-15 17:41:15 +04:00
|
|
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
|
|
|
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
|
|
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
|
|
|
|
2014-12-16 15:31:25 +04:00
|
|
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
2014-12-15 17:41:15 +04:00
|
|
|
--error ER_UDF_EXISTS
|
|
|
|
CREATE FUNCTION metaphon RETURNS INT SONAME "$UDF_EXAMPLE_SO";
|
|
|
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
|
|
|
|
2014-12-16 15:31:25 +04:00
|
|
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
2014-12-15 17:41:15 +04:00
|
|
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
|
|
|
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
|
|
|
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
|
|
|
|
|
|
|
DROP FUNCTION IF EXISTS metaphon;
|
|
|
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
|
|
|
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
|
|
|
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
|
|
|
|
2014-12-16 15:31:25 +04:00
|
|
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
2014-12-15 17:41:15 +04:00
|
|
|
--error ER_WRONG_USAGE
|
|
|
|
eval CREATE OR REPLACE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
|
|
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
|
|
|
|
|
|
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
|
|
|
eval CREATE OR REPLACE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
|
|
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
|
|
|
|
2014-12-16 15:31:25 +04:00
|
|
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
2014-12-15 17:41:15 +04:00
|
|
|
--error ER_UDF_EXISTS
|
|
|
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
|
|
|
SELECT metaphon('mariadb');
|
|
|
|
|
|
|
|
DROP FUNCTION metaphon;
|
|
|
|
DROP FUNCTION IF EXISTS metaphon;
|