summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/r/rpl_udf.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl/r/rpl_udf.result')
-rw-r--r--mysql-test/suite/rpl/r/rpl_udf.result31
1 files changed, 15 insertions, 16 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_udf.result b/mysql-test/suite/rpl/r/rpl_udf.result
index f9a5765d3a3..61ea8043440 100644
--- a/mysql-test/suite/rpl/r/rpl_udf.result
+++ b/mysql-test/suite/rpl/r/rpl_udf.result
@@ -1,8 +1,8 @@
include/master-slave.inc
[connection master]
+connection master;
drop table if exists t1;
"*** Test 1) Test UDFs via loadable libraries ***
-"Running on the master"
CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
affected rows: 0
CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
@@ -14,13 +14,13 @@ name ret dl type
myfunc_double 1 UDF_LIB function
myfunc_int 2 UDF_LIB function
affected rows: 2
-"Running on the slave"
+connection slave;
SELECT * FROM mysql.func ORDER BY name;
name ret dl type
myfunc_double 1 UDF_LIB function
myfunc_int 2 UDF_LIB function
affected rows: 2
-"Running on the master"
+connection master;
CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM;
affected rows: 0
INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00));
@@ -38,7 +38,7 @@ sum price
100 48.6
200 49
affected rows: 4
-"Running on the slave"
+connection slave;
SELECT * FROM t1 ORDER BY sum;
sum price
1 48.5
@@ -54,7 +54,7 @@ SELECT myfunc_double(75.00);
myfunc_double(75.00)
50.00
affected rows: 1
-"Running on the master"
+connection master;
DROP FUNCTION myfunc_double;
affected rows: 0
DROP FUNCTION myfunc_int;
@@ -62,15 +62,14 @@ affected rows: 0
SELECT * FROM mysql.func ORDER BY name;
name ret dl type
affected rows: 0
-"Running on the slave"
+connection slave;
SELECT * FROM mysql.func ORDER BY name;
name ret dl type
affected rows: 0
-"Running on the master"
+connection master;
DROP TABLE t1;
affected rows: 0
"*** Test 2) Test UDFs with SQL body ***
-"Running on the master"
CREATE FUNCTION myfuncsql_int(i INT) RETURNS INTEGER DETERMINISTIC RETURN i;
affected rows: 0
CREATE FUNCTION myfuncsql_double(d DOUBLE) RETURNS INTEGER DETERMINISTIC RETURN d * 2.00;
@@ -80,13 +79,13 @@ db name type param_list body comment
test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00
test myfuncsql_int FUNCTION i INT RETURN i
affected rows: 2
-"Running on the slave"
+connection slave;
SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%' ORDER BY name;
db name type param_list body comment
test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00
test myfuncsql_int FUNCTION i INT RETURN i
affected rows: 2
-"Running on the master"
+connection master;
CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM;
affected rows: 0
INSERT INTO t1 VALUES(myfuncsql_int(100), myfuncsql_double(50.00));
@@ -104,7 +103,7 @@ sum price
100 100
200 50
affected rows: 4
-"Running on the slave"
+connection slave;
SELECT * FROM t1 ORDER BY sum;
sum price
1 1000
@@ -112,7 +111,7 @@ sum price
100 100
200 50
affected rows: 4
-"Running on the master"
+connection master;
ALTER FUNCTION myfuncsql_int COMMENT "This was altered.";
affected rows: 0
ALTER FUNCTION myfuncsql_double COMMENT "This was altered.";
@@ -122,7 +121,7 @@ db name type param_list body comment
test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered.
test myfuncsql_int FUNCTION i INT RETURN i This was altered.
affected rows: 2
-"Running on the slave"
+connection slave;
SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%' ORDER BY name;
db name type param_list body comment
test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered.
@@ -136,7 +135,7 @@ SELECT myfuncsql_double(75.00);
myfuncsql_double(75.00)
150
affected rows: 1
-"Running on the master"
+connection master;
DROP FUNCTION myfuncsql_double;
affected rows: 0
DROP FUNCTION myfuncsql_int;
@@ -144,11 +143,11 @@ affected rows: 0
SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%' ORDER BY name;
db name type param_list body comment
affected rows: 0
-"Running on the slave"
+connection slave;
SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%' ORDER BY name;
db name type param_list body comment
affected rows: 0
-"Running on the master"
+connection master;
DROP TABLE t1;
affected rows: 0
include/rpl_end.inc