Bug #23625 | Admin restore of a function which was backed up gives syntax error | ||
---|---|---|---|
Submitted: | 25 Oct 2006 13:04 | Modified: | 25 Oct 2006 19:31 |
Reporter: | Joe Simone | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Administrator | Severity: | S2 (Serious) |
Version: | 1.2.4 beta | OS: | Windows (windows XP) |
Assigned to: | CPU Architecture: | Any | |
Tags: | admin, Backup, error, FUNCTION, restore, SQL, syntax |
[25 Oct 2006 13:04]
Joe Simone
[25 Oct 2006 16:35]
MySQL Verification Team
Thank you for the bug report. I was able to restore the script you have provide here with MySQL Administrator: mysql> show create function localize\G *************************** 1. row *************************** Function: localize sql_mode: NO_AUTO_VALUE_ON_ZERO Create Function: CREATE DEFINER=`e2m`@`%` FUNCTION `localize`(s text, locale char(5)) RETURNS text CHARSET utf8 begin if (length(rtrim(locale)) = 0) then set locale = 'en_US'; end if; set @beginTag = concat('[', locale, ']'); set @endtag = concat('[/', locale, ']'); set @beginIndex = instr(s, @beginTag); set @endIndex = instr(s, @endTag); if (@beginIndex > 0 && @endIndex > 0) then return substr(s, @beginIndex + length(@beginTag), @endIndex - @beginIndex - length(@beginTag)); end if; return s; end 1 row in set (0.00 sec)
[25 Oct 2006 19:31]
Joe Simone
Miguel, You have to use the Query Browser to restore the script. That's where the error is. I have found the admin is unreliable in doing restores so I don't use it --- that's a different bug report! Joe