1include/master-slave.inc
2[connection master]
3connection master;
4CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
5SELECT metaphon('master');
6metaphon('master')
7MSTR
8CREATE FUNCTION metaphon RETURNS INT SONAME "UDF_EXAMPLE_LIB";
9ERROR HY000: Function 'metaphon' already exists
10connection slave;
11SELECT metaphon('slave');
12metaphon('slave')
13SLF
14connection master;
15CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
16Warnings:
17Note	1125	Function 'metaphon' already exists
18DROP FUNCTION IF EXISTS random_function_name;
19Warnings:
20Note	1305	FUNCTION test.random_function_name does not exist
21CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
22Warnings:
23Note	1125	Function 'metaphon' already exists
24CREATE OR REPLACE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
25ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
26connection slave;
27SELECT metaphon('slave');
28metaphon('slave')
29SLF
30connection master;
31DROP FUNCTION metaphon;
32CREATE OR REPLACE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
33CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
34ERROR HY000: Function 'metaphon' already exists
35connection slave;
36SELECT metaphon('slave');
37metaphon('slave')
38SLF
39connection master;
40DROP FUNCTION metaphon;
41DROP FUNCTION IF EXISTS metaphon;
42Warnings:
43Note	1305	FUNCTION test.metaphon does not exist
44connection slave;
45DROP FUNCTION metaphon;
46ERROR 42000: FUNCTION test.metaphon does not exist
47DROP FUNCTION IF EXISTS metaphon;
48Warnings:
49Note	1305	FUNCTION test.metaphon does not exist
50include/rpl_end.inc
51