Bug #3716 mysqldump feature request: --add-drop-database
Submitted: 11 May 2004 17:56 Modified: 7 Aug 2005 2:03
Reporter: Martin Hansen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:Any (all)
Assigned to: Brian Aker CPU Architecture:Any

[11 May 2004 17:56] Martin Hansen
Description:
Hello.

This is a feature request for mysqldump.

I have been in contact with your documentation department, and they told me to post a feature request here, so here it goes:

I have looked all over in the documentation, but couldn't
    seem to find any helpful information there. Therefore I'm writing to
    you now.

I have a very big DB (actually *many* databases) on one
    mysqlserver, and I want to create a dump. I have successfully used
    mysqldump for this purpose, but I need one feature that I can't find
    in the manuals - maybe because it isn't
    there:

--add-drop-database

I want mysqldump to insert a 'DROP
    DATABASE mydbname IF EXISTS' before every 'CREATE DATABASE mydbname'.
    So far I've done this by hand on the output of the dump, but this
    takes hours when you have many db's and is a straight-forward feature
    in my opinion.

Hoping for a quick reply.

Sincerely

Martin
    Hansen.

How to repeat:
since this is not a bugreport, I'll this write some text here...

Suggested fix:
since this is not a bugreport, I'll this write some text here...
[21 Jun 2005 1:13] Brian Aker
Added to most recent 4.1
[21 Jun 2005 1:20] Paul Dubois
"Added to most recent 4.1" isn't sufficient
for setting a bug report to documenting. We
need the exact three-part version number.

Setting this back to Open status.
[21 Jun 2005 1:29] Brian Aker
4.1.13
[7 Aug 2005 2:03] Mike Hillyer
Added to 4.1.13 changelog, added to mysqldump section of refman:

<listitem><para>
 Added <literal>--add-drop-database</literal> option to <literal>mysqldump</literal>. (Bug #3716)
</para></listitem>