Menu

#4765 Exporting tables from within a DB produces create database code

4.0.4
out-of-date
nobody
None
Normal
2015-02-15
2015-02-14
teo8976
No

This is a regression.
(if this has been done by design, it's a wrong design)

Steps to reproduce:

  • select a database
  • go to Export. Note that the title in the page reads "Exporting TABLES from <database name="">"</database>
  • Go with the quick export, or select Custom and go

NOTE: this is not the same as going to Home, then Export, and select a one or more whole databases to export.

Expected:
The exported .sql (at least by default) should NOT contain the "create database" and "use" statements, because we are exporting tables from within a database. It is supposed to export only tables (with or without data), so that they can be imported into a database of any name. This is how it used to work
In the Custom section there's no option to choose whether or not to include the Create database statement, hence it should either NOT include it, or there should be an option for that, disabled by default.

Observed
The exported .sql file contains "create database" and "use" statements, with the name of the database.

This means that the following won't work:

  • enter a database
  • export its tables
  • enter another database
  • import the tables you exported
    => epic fail: it will import them to the original database (or to a new database of the same name as the original if you are importing to a different server), and not into the database into which you are supposed to be importing.

This is a HUGE regression

Discussion

  • Marc Delisle

    Marc Delisle - 2015-02-15
    • Priority: 5 --> Normal
     
  • Marc Delisle

    Marc Delisle - 2015-02-15

    If you are really reporting this for version 4.0.4, you are out of date.

     
  • teo8976

    teo8976 - 2015-02-15

    1) it shouldn't be difficult for you to check whether it's fixed in a later version.
    2) usually in bug trackers, versions that are too old to report bugs for are marked as such (or not available at all) in the version selector.
    3) current versions of distros such as Debian out there still ship versions as old as 3.x

     
    • Marc Delisle

      Marc Delisle - 2015-02-15

      1) It shouldn't be difficult for you either (we have a demo server); as a courtesy for you, I did the check in 4.3.9 and I cannot reproduce the bug

      2) We leave open old versions in the tracker because we still have to check whether older tickets are valid

      3) This does not change our decision about what we support; see http://www.phpmyadmin.net/home_page/downloads.php

       
  • Marc Delisle

    Marc Delisle - 2015-02-15
    • status: pending --> out-of-date