Bug #55457 | MySQL Workbench ignores database specified in connection on import | ||
---|---|---|---|
Submitted: | 21 Jul 2010 19:53 | Modified: | 6 Feb 2013 2:18 |
Reporter: | Matthew Taylor | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Workbench | Severity: | S3 (Non-critical) |
Version: | 5.2.25 | OS: | MacOS (10.6.4) |
Assigned to: | CPU Architecture: | Any | |
Tags: | import |
[21 Jul 2010 19:53]
Matthew Taylor
[22 Jul 2010 16:51]
Johannes Taxacher
Hi Matthew, at point 3 of your description when you say "import your previously dumped file" do you mean to load it into the query session and run it from the SQL Query editor? or importing again via Administration interface? The Administration interface does not provide a method to restore a backup into another schema name, and when you create a backup/dump this dump includes a "USE <dumpedschema>" statement which prevents workbench from using the default schema selected in UI. I guess i'm missing sth in your description, please clarify. thanks in advance.
[22 Jul 2010 18:52]
Matthew Taylor
Clarification: Where I say "import your previously dumped file" I mean import it using the Import from Disk section of the Data Dump tab of the Server Administration interface. Not all dumps created via command line will include a "USE <dbname>" statement. Workbench might well do this consistently (I lack the experience with Workbench to know), but I was using Workbench to import a dump file created by another script on another machine as part of a server migration. I can see this coming up regardless when loading data from one database schema into another, say for testing known good data on a non-production database. Perhaps then this is not a bug if the behavior is as intended - you can never specify via Workbench what schema you wish to import into - but then I guess for me it is a feature request - I want the ability to use Workbench to move dumps around for testing or migration without hand editing the files to do so, and it will not always be the case that I control where or how the dumps were produced. Does this clarify sufficiently? Matthew
[23 Jul 2010 4:16]
Valeriy Kravchuk
Based on your last clarification, I'd say this is a reasonable feature request: Workbench should allow to import dump to different schema, even if it has to find and change USE statement(s) in the dump accordingly.
[14 Sep 2011 4:31]
Stuart Richman
Not all dumps include the USE statement and there doesn't seem to be a way to set the default schema for imports in the Workbench. If the use statement is not included in the dump, then there is no way to import the files. Each file would need to be manually edit to add the USE statement.
[6 Feb 2013 2:18]
Alfredo Kojima
Closing old bug, an option to select the target DB was already added for cases where the imported file does not have it specified.