Description:
Currently, mysqldump does not provide an option to dump specific procedures or functions. While we can dump selected tables, there's no equivalent functionality for routines. In environments with numerous stored procedures and functions, the ability to selectively dump routines would significantly ease migrations and backups.
This feature would significantly enhance the flexibility and usability of mysqldump, particularly for customers managing complex environments with numerous stored procedures and functions.
How to repeat:
NA
Suggested fix:
Proposed New Options:
--list-procedures: Dump only the specified list of procedures
--list-functions: Dump only the specified list of functions
Usage Examples:
mysqldump --list-procedures=proc1,proc2,proc3 database_name mysqldump --list-functions=func1,func2,func3 database_name
Considerations:
* These new options should be mutually exclusive with the existing --routines option for safety and clarity.
* If both --list-procedures and --list-functions are used, the dump should include the specified procedures and functions.
* If a specified procedure or function doesn't exist, the tool should provide a warning but continue with the dump.