Commit 3aa2a62f authored by pem@mysql.comhem.se's avatar pem@mysql.comhem.se

Fixed BUG#5258: Stored procedure modified date is 0000-00-00.

  Althought techically not a but (as it's functioning as designed),
  it was decided that the design should be changed. Some users have
  a problem with dates being '0000-00-00' and the SQL standard specifies
  that the modification date should be the same as the creation date
  at creation.
parent 2e38c0bf
......@@ -1784,6 +1784,24 @@ select @x|
@x
3
drop procedure bug5307|
create procedure bug5258()
begin
end|
create procedure bug5258_aux()
begin
declare c, m char(19);
select created,modified into c,m from mysql.proc where name = 'bug5258';
if c = m then
select 'Ok';
else
select c, m;
end if;
end|
call bug5258_aux()|
Ok
Ok
drop procedure bug5258|
drop procedure bug5258_aux|
drop table if exists fac|
create table fac (n int unsigned not null primary key, f bigint unsigned)|
create procedure ifac(n int unsigned)
......
......@@ -1953,6 +1953,30 @@ call bug5307()|
select @x|
drop procedure bug5307|
#
# BUG#5258: Stored procedure modified date is 0000-00-00
# (This was a design flaw)
create procedure bug5258()
begin
end|
create procedure bug5258_aux()
begin
declare c, m char(19);
select created,modified into c,m from mysql.proc where name = 'bug5258';
if c = m then
select 'Ok';
else
select c, m;
end if;
end|
call bug5258_aux()|
drop procedure bug5258|
drop procedure bug5258_aux|
#
# Some "real" examples
......
......@@ -371,6 +371,7 @@ db_create_routine(THD *thd, int type, sp_head *sp)
table->field[MYSQL_PROC_FIELD_DEFINER]->
store(definer, (uint)strlen(definer), system_charset_info);
((Field_timestamp *)table->field[MYSQL_PROC_FIELD_CREATED])->set_time();
((Field_timestamp *)table->field[MYSQL_PROC_FIELD_MODIFIED])->set_time();
table->field[MYSQL_PROC_FIELD_SQL_MODE]->
store((longlong)thd->variables.sql_mode);
if (sp->m_chistics->comment.str)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment