Debian Codegraph @

mysql-test/suite/rpl/r/rpl_create_drop_function.result

raw
1 include/master-slave.inc
2 [connection master]
3 connection master;
4 CREATE FUNCTION hello (str CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN
5 CONCAT('Hello, ', str, '!');
6 CREATE FUNCTION hello (str CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN
7 CONCAT('Hello, ', str, '!');
8 ERROR 42000: FUNCTION hello already exists
9 connection slave;
10 SHOW CREATE FUNCTION hello;
11 Function sql_mode Create Function character_set_client collation_connection Database Collation
12 hello STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(str CHAR(20)) RETURNS char(50) CHARSET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci
13 DETERMINISTIC
14 RETURN
15 CONCAT('Hello, ', str, '!') latin1 latin1_swedish_ci utf8mb4_uca1400_ai_ci
16 connection master;
17 CREATE OR REPLACE FUNCTION IF NOT EXISTS hello (str CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN
18 CONCAT('Hello, ', str, '!');
19 ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
20 CREATE OR REPLACE FUNCTION hello (str CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN
21 CONCAT('Hello, ', str, '!');
22 SELECT hello('master');
23 hello('master')
24 Hello, master!
25 connection slave;
26 SELECT hello('slave');
27 hello('slave')
28 Hello, slave!
29 connection master;
30 CREATE FUNCTION IF NOT EXISTS hello (str CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN
31 CONCAT('Hello, ', str, '!');
32 Warnings:
33 Note 1304 FUNCTION hello already exists
34 CREATE OR REPLACE FUNCTION bye (str CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN
35 CONCAT('Bye, ', str, '!');
36 SELECT hello('master');
37 hello('master')
38 Hello, master!
39 SELECT bye('master');
40 bye('master')
41 Bye, master!
42 connection slave;
43 SELECT hello('slave');
44 hello('slave')
45 Hello, slave!
46 SELECT bye('slave');
47 bye('slave')
48 Bye, slave!
49 connection master;
50 DROP FUNCTION hello;
51 DROP FUNCTION IF EXISTS bye;
52 connection slave;
53 DROP FUNCTION hello;
54 ERROR 42000: FUNCTION test.hello does not exist
55 DROP FUNCTION IF EXISTS bye;
56 Warnings:
57 Note 1305 FUNCTION test.bye does not exist
58 include/rpl_end.inc