Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Create database if not exists" line should not be included during an SQL server export when only exporting data #19084

Open
LHofman opened this issue Mar 29, 2024 · 0 comments
Labels
affects/5.2 This issue or pull-request affects 5.2.x releases (and maybe further versions) Bug A problem or regression with an existing feature confirmed/5.2 This issue is confirmed to be reproduced on 5.2 at the time this label was set

Comments

@LHofman
Copy link
Contributor

LHofman commented Mar 29, 2024

Describe the bug

When doing an SQL Server Export (Exporting when no DB/Table is selected) and choosing to export only data.
The First line in in the SQL file is "Create database if not exists", which does not make sense when exporting only data.
Even if the database doesn't exist yet, the SQL file will not create the table, but try to insert the data anyway.

To Reproduce

Steps to reproduce the behavior:

  1. at startup /phpmyadmin
  2. go to export (route=/server/export)
  3. export method: custom
  4. sql format.
  5. select the database(s).
  6. Format-specific options: choose "data"
  7. download file #-1

Expected behavior

The export file only has SQL statements to insert the data, not to create the database.
The "use database_name" line should stay.

Screenshots

Screenshot 2024-03-30 001529

Server configuration

  • phpMyAdmin version: All
@MauricioFauth MauricioFauth added Bug A problem or regression with an existing feature affects/5.2 This issue or pull-request affects 5.2.x releases (and maybe further versions) confirmed/5.2 This issue is confirmed to be reproduced on 5.2 at the time this label was set labels Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/5.2 This issue or pull-request affects 5.2.x releases (and maybe further versions) Bug A problem or regression with an existing feature confirmed/5.2 This issue is confirmed to be reproduced on 5.2 at the time this label was set
Projects
None yet
Development

No branches or pull requests

2 participants