## Creating new function f1 fails because no DETERMINISTIC ###
@@sql_log_bin
1
## Creating new function f1 ##
CREATE FUNCTION f1(a INT) RETURNS INT
CREATE FUNCTION f1(a INT) RETURNS INT
BEGIN
BEGIN
IF (a < 3) THEN
IF (a < 3) THEN
...
@@ -21,8 +18,24 @@ INSERT INTO t2 VALUES (a);
...
@@ -21,8 +18,24 @@ INSERT INTO t2 VALUES (a);
END IF;
END IF;
RETURN 1;
RETURN 1;
END|
END|
'Bug: Create Function should give error here because non-super user';
ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
'is creating function here';
## Creating new function f1 fails because non-super user ##
CREATE FUNCTION f1(a INT) RETURNS INT DETERMINISTIC
BEGIN
IF (a < 3) THEN
INSERT INTO t2 VALUES (a);
END IF;
RETURN 1;
END|
ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
## Creating new function f1 succeeds ##
CREATE FUNCTION f1(a INT) RETURNS INT DETERMINISTIC