1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-26 01:44:06 +03:00
Files
mariadb/mysql-test/r/log_bin_trust_function_creators_func.result
Horst Hunger a5e248d402 Final fix for bug#38349: Did the changes due to the 2 reviews.
- Updated slow_query_log_file_basic and general_log_file basis instead of the func version as
the func version run good but the basic versions fail.
- Sent innodb.test to dev@innodb.com.
- variables.test has differences probably due to a bug in mtr or in the SET statement (see bug#39369).
- general_log_file_basic.test and slow_query_log_file_bsaic.test have differences, which might be 
produced by the new mtr (see bug#38124).
2008-09-10 12:50:39 +02:00

75 lines
1.8 KiB
Plaintext

drop table if exists t1;
'#--------------------FN_DYNVARS_063_01-------------------------#'
SET @start_value= @@global.log_bin_trust_function_creators;
## Creating new user tt ##
CREATE USER tt@localhost;
## Setting value of variable to 0 ##
SET @@global.log_bin_trust_function_creators = 0;
## Creating new table t2 ##
CREATE TABLE t2 (a INT);
## Creating & connecting with new connection test_con1 ##
SELECT @@log_bin_trust_function_creators;
@@log_bin_trust_function_creators
0
SELECT @@sql_log_bin;
@@sql_log_bin
1
## Creating new function f1 ##
CREATE FUNCTION f1(a INT) RETURNS INT
BEGIN
IF (a < 3) THEN
INSERT INTO t2 VALUES (a);
END IF;
RETURN 1;
END|
'Bug: Create Function should give error here because non-super user';
'is creating function here';
## Creating new table t1 ##
CREATE TABLE t1 (a INT);
## Inserting some records in t1 ##
INSERT INTO t1 VALUES (1),(2),(3);
SELECT f1(a) FROM t1;
f1(a)
1
1
1
## Dropping function f1 & table t1 ##
DROP FUNCTION f1;
DROP TABLE t1;
'#--------------------FN_DYNVARS_063_02-------------------------#'
## Switching to default connection ##
## Setting value of variable to 1 ##
SET @@global.log_bin_trust_function_creators = 1;
## Creating and connecting to new connection test_con2 ##
## Verifying value of variable ##
SELECT @@log_bin_trust_function_creators;
@@log_bin_trust_function_creators
1
SELECT @@sql_log_bin;
@@sql_log_bin
1
## Creating new function f1 ##
CREATE FUNCTION f1(a INT) RETURNS INT
BEGIN
IF (a < 3) THEN
INSERT INTO t2 VALUES (a);
END IF;
RETURN 1;
END|
## Creating new table t1 ##
CREATE TABLE t1 (a INT);
## Inserting values in table t1 ##
INSERT INTO t1 VALUES (1),(2),(3);
SELECT f1(a) FROM t1;
f1(a)
1
1
1
## Dropping function f1 ##
DROP FUNCTION f1;
## Dropping table t1 & t2 ##
DROP TABLE t1,t2;
## Disconnecting test_con2##
DROP USER tt@localhost;
SET @@global.log_bin_trust_function_creators= @start_value;