Bug #16784 Stored Procedures & Functions not backed up
Submitted: 25 Jan 2006 15:50 Modified: 31 Jul 2006 21:10
Reporter: Don Weaver Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.1.6 OS:Linux (Fedora Core 4)
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: Backup

[25 Jan 2006 15:50] Don Weaver
Description:
The backup routine appears to skip backing up stored procedures & functions.

How to repeat:
Execute a backup against a database with stored procedures then drop the database and restore it and the stored procedures aren't there in the database.
[25 Jan 2006 16:27] Valeriy Kravchuk
Thank you for a problem report. Please, specify the exact version of MySQL server you are trying to backup a database from. Upload the backup project and/or results for the smalles possible database that shows this behaviour. You can use File tab for this.
[25 Jan 2006 17:57] Don Weaver
MySQL-server-standard-5.0.18.0.rhel4
[26 Jan 2006 18:18] MySQL Verification Team
Can you point me which exactly package you've installed for Administrator
because I was unable to create the backup due to another bug already
reported with message error: Error during Backup Cannot set ANSI quotes
with MA 1.1.5 and now with 1.1.6. Tested on Fedora Core 4.

Thanks in advance.
[26 Jan 2006 20:50] Don Weaver
Hi Miguel,

The fix for ansi quotes is on Remi Collette's web page.  Version fedora core 4.

The administrator I'm running is 1.1.6-2

mysql-administrator-1.1.6-2.remi.fc4.i386.rpm

thanks,
[26 Jan 2006 23:04] Jorge del Conde
Thanks for your bug report.  I was able to reproduce this under FC4 with 1.1.7
[2 May 2006 23:21] Alfredo Kojima
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html
[8 May 2006 15:02] NOT_FOUND NOT_FOUND
I've found the same Ansi quotes bug with the same version (1.1.6) on SUSE10.  I've been looking for Remi Collette's web page for the solution but wasn't able to find it.  

Would there be another way to fix this issue?  Would the link to the source trees contain a solution already for this or will I have to modify something?
[10 May 2006 20:33] Don Weaver
Still not working.... functions & procedures show in the query browser but they don't execute properly.... one function using last_insert_id() stopped working entirely.  Procedures randomly fail.

I can still manually restore and correct.
[11 May 2006 1:32] Alfredo Kojima
Please attach the backup file causing the error.
[11 May 2006 13:15] Don Weaver
Hi Alfredo,

What I meant by my last comment was the latest version mysql-administrator isn't restoring the stored functions properly from what I can tell.  The last backup I made with it contains sensitive data so I can't sent that to you to try.  Just take the lastest version administrator create a database with a stored function that returns something like an int and test that.

I think the restore is creating a stored function in the database as a procedure preventing it from returning anything..... my 2 cents.

thanks,
[27 Jun 2006 3:41] Jared S
Hi,

Is this the bug where the $$ are put in the wrong spot and cause the SQL backup script to fail all Stored Procedures?
[14 Jul 2006 13:20] Don Weaver
Hi,

I'm somewhat new to the linux side of things and it's been years since I've done anything with a unix type environment.  I didn't know what jared sullivan meant by the last comment so I looked in my backup file to see what's up.

In there I did see all my stored procedures and functions and comparing them with other scripts I have ( that work ) they appeared all the same so..... I'm still at a loss as to why the backup doesn't restore them.

thanks anyway !
[17 Jul 2006 23:59] Jared S
Check out..

http://dev.mysql.com/downloads/gui-tools/5.0.html

These Executables are even newer than seperatley listed and may have other fixes in as well.

I think they do packages for LINUX as well.
[31 Jul 2006 21:10] Alfredo Kojima
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://www.mysql.com/doc/en/Installing_source_tree.html