mariadb/mysql-test/suite/rpl/t/rpl_create_drop_udf.test
Alexander Barkov ea01fff505 Fixing test failures caused by the previous commits.
Adding "--source include/have_udf.inc" and a few "--replace" commands.
2014-12-16 15:31:25 +04:00

56 lines
1.5 KiB
Text

--source include/have_udf.inc
--source include/master-slave.inc
connection master;
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
SELECT metaphon('master');
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
--error ER_UDF_EXISTS
eval CREATE FUNCTION metaphon RETURNS INT SONAME "$UDF_EXAMPLE_SO";
sync_slave_with_master;
SELECT metaphon('slave');
connection master;
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
DROP FUNCTION IF EXISTS random_function_name;
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
--error ER_WRONG_USAGE
eval CREATE OR REPLACE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
sync_slave_with_master;
SELECT metaphon('slave');
connection master;
DROP FUNCTION metaphon;
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
eval CREATE OR REPLACE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
--error ER_UDF_EXISTS
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
sync_slave_with_master;
SELECT metaphon('slave');
connection master;
DROP FUNCTION metaphon;
DROP FUNCTION IF EXISTS metaphon;
sync_slave_with_master;
--error ER_SP_DOES_NOT_EXIST
DROP FUNCTION metaphon;
DROP FUNCTION IF EXISTS metaphon;
--source include/rpl_end.inc