Commit e46dbc9b authored by unknown's avatar unknown
Browse files

Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint

into  salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.1-maint-16456


mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
parents 0aad12d9 b84e9d10
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1060,6 +1060,7 @@ Note 1003 select timestampdiff(WEEK,_latin1'2001-02-01',_latin1'2001-05-01') AS
select time_format('100:00:00', '%H %k %h %I %l');
time_format('100:00:00', '%H %k %h %I %l')
100 100 04 04 4
SET GLOBAL log_bin_trust_function_creators = 1;
create table t1 (a timestamp default '2005-05-05 01:01:01',
b timestamp default '2005-05-05 01:01:01');
drop function if exists t_slow_sysdate;
@@ -1083,6 +1084,7 @@ a != b
drop trigger t_before;
drop function t_slow_sysdate;
drop table t1;
SET GLOBAL log_bin_trust_function_creators = 0;
create table t1 (a datetime, i int, b datetime);
insert into t1 select sysdate(), sleep(1), sysdate() from dual;
select a != b from t1;
+2 −1
Original line number Diff line number Diff line
@@ -679,10 +679,11 @@ insert into t1 values (null,null);
ERROR 23000: Column 's1' cannot be null
drop table t1;
drop procedure if exists fn3;
create function fn3 () returns point return GeomFromText("point(1 1)");
create function fn3 () returns point deterministic return GeomFromText("point(1 1)");
show create function fn3;
Function	sql_mode	Create Function
fn3		CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS point
    DETERMINISTIC
return GeomFromText("point(1 1)")
select astext(fn3());
astext(fn3())
+4 −2
Original line number Diff line number Diff line
@@ -365,13 +365,14 @@ insert into mysql.user select * from t1;
drop table t1, t2;
drop database TESTDB;
flush privileges;
SET GLOBAL log_bin_trust_function_creators = 1;
grant all privileges on test.* to `a@`@localhost;
grant execute on * to `a@`@localhost;
create table t2 (s1 int);
insert into t2 values (1);
drop function if exists f2;
create function f2 () returns int begin declare v int; select s1 from t2
into v; return v; end//
create function f2 () returns int
begin declare v int; select s1 from t2 into v; return v; end//
select f2();
f2()
1
@@ -379,3 +380,4 @@ drop function f2;
drop table t2;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM `a@`@localhost;
drop user `a@`@localhost;
SET GLOBAL log_bin_trust_function_creators = 0;
+2 −0
Original line number Diff line number Diff line
drop table if exists t1;
SET GLOBAL log_bin_trust_function_creators = 1;
create table t1 (col1 integer primary key, col2 integer) engine=innodb;
insert t1 values (1,100);
create function f1 () returns integer begin
@@ -18,3 +19,4 @@ rollback;
rollback;
drop table t1;
drop function f1;
SET GLOBAL log_bin_trust_function_creators = 0;
+2 −2
Original line number Diff line number Diff line
@@ -1500,9 +1500,9 @@ create procedure proc_1() reset query cache;
call proc_1();
call proc_1();
call proc_1();
create function func_1() returns int begin reset query cache; return 1; end|
create function func_1() returns int deterministic begin reset query cache; return 1; end|
ERROR 0A000: RESET is not allowed in stored function or trigger
create function func_1() returns int begin call proc_1(); return 1; end|
create function func_1() returns int deterministic begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
ERROR 0A000: RESET is not allowed in stored function or trigger
drop function func_1;
Loading