Menu

#3108 (ok 3.3.8) Functions/Procedures should come first in export

3.3.7
fixed
1
2013-06-11
2010-09-09
Greg Roach
No

CREATE DATABASE test;
USE test;
CREATE FUNCTION fish() RETURNS TEXT RETURN 'are best';
CREATE VIEW fishy AS SELECT fish();

Use the database "export" function, and tick the box to include functions.

The export order is (1) tables/view, (2) functions/procedures.

You can create a function that refers to non-existent tables/views/functions.

You CANNOT create a view that refers to non-existent functions.

Hence this export file cannot be reimported without manually editing it first

Suggestion: export the routines first.

Discussion

  • Greg Roach

    Greg Roach - 2010-09-17

    The same export/import sequence is used when copying/renaming databases, and these processes also fail, for the same reason.

     
  • Dieter Adriaenssens

    • assigned_to: nobody --> ruleant
     
  • Dieter Adriaenssens

    • priority: 5 --> 1
    • summary: Functions/Procedures should come first in export --> (ok 3.3.8) Functions/Procedures should come first in export
    • status: open --> open-fixed
     
  • Dieter Adriaenssens

    This bug was fixed in repository and will be part of a future release; thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2010-10-25
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

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