Bug #117100 Add options to selectively dump procedures and functions in mysqldump
Submitted: 2 Jan 22:25 Modified: 3 Jan 4:43
Reporter: Chelluru Vidyadhar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S4 (Feature request)
Version:9.x OS:Any
Assigned to: CPU Architecture:Any

[2 Jan 22:25] Chelluru Vidyadhar
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.
[3 Jan 4:43] MySQL Verification Team
Hello Chelluru,

Thank you for the enhancement request!!

regards,
Umesh