Menu

#2662 (ok 2.11.6) Renaming a Database fails to copy Functions

2.11.5.1
fixed
1
2013-06-11
2008-03-19
Chris Nagle
No

I am running MySQL 5.0.48 with PHP 5.2.5 on Windows XP SP2 with the most recent patches using PHPMyAdmin 2.11.5.

Login as root to PHPMyAdmin
Select a database that has user defined functions associated with it.
Click the Operations Tab.
Rename the database from cnagle_braille to nercve_braille.
Now examine the proc table in the mysql database the user defined functions associated with the cnagle_braille database have disappeared and none exist for nercve_braille.

Where'd they go?

I would prefer not to disclose my database schema. Here is the create statement for one of the functions that dissappears. If you need more information please let me know, I will be happy to try and help.

CREATE DEFINER=`nercve`@`localhost` FUNCTION `fInCourse`(course INT(11), user INT(11)) RETURNS tinyint(1) READS SQL DATA DETERMINISTIC RETURN (SELECT IFNULL((SELECT 1 FROM Courses c WHERE c.id = course AND c.deleted = 0 AND (c.Instructor = user OR user IN (SELECT UserID FROM CourseUser WHERE CourseID = course) OR 1 = user)),0))

Discussion

  • Marc Delisle

    Marc Delisle - 2008-04-14
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2008-04-14

    Logged In: YES
    user_id=210714
    Originator: NO

    Fixed in subversion, thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2008-04-14
    • milestone: --> 2.11.5.1
    • summary: Renaming a Database fails to copy Functions --> (ok 2.11.6) Renaming a Database fails to copy Functions
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2008-04-14
    • priority: 5 --> 1
     
  • Marc Delisle

    Marc Delisle - 2008-04-29
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
MongoDB Logo MongoDB