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

Export MySQL Table (only structure) AUTOINCREMENT error #14066

Closed
mmendivilg opened this issue Mar 8, 2018 · 3 comments
Closed

Export MySQL Table (only structure) AUTOINCREMENT error #14066

mmendivilg opened this issue Mar 8, 2018 · 3 comments
Assignees
Labels
bug A problem or regression with an existing feature
Milestone

Comments

@mmendivilg
Copy link

Steps to reproduce

1.Have a MySQL Database with a Table with a int primary key with autoincrement
2.Have Data in your table
3.Select the Database from the left database menu (tree)
4.Click on Export from the top menu.
5.Check "Custom - display all possible options"
6.Uncheck the "data" from the export options (export only structure)

Expected behaviour

ALTER TABLE bank_account_statements
MODIFY id_bank_account_statement int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

Actual behaviour

-- See that AUTO_INCREMENT = 4 should not be there. Since I want to export a table with no data.

ALTER TABLE bank_account_statements
MODIFY id_bank_account_statement int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
COMMIT;

Server configuration

Operating system:
Localhost via UNIX socket

Web server:
5.6.38 - MySQL Community Server (GPL)
PHP version:
5.6.34

Database:
MySQL

phpMyAdmin version:
4.7.7

Client configuration

Browser:
Google Chrome

Operating system:
Windows 10

@ibennetch
Copy link
Member

This only affects database-level exports, table-level exports seem to be fine.

@ibennetch ibennetch added the bug A problem or regression with an existing feature label Mar 10, 2018
@ibennetch
Copy link
Member

Also, both QA_4_7 and master are currently affected.

@meteorlxy
Copy link
Contributor

meteorlxy commented Mar 24, 2018

In table-level exports, when selecting structure only, the AUTO_INCREMENT value will be auto disabled (so does in server-level exports).

In database-level exports, the structure or data options of tables could be diverse, and the single AUTO_INCREMENT value will not work for all the tables for sure (enable by default). That's what causes this bug. I'll try to fix it.

meteorlxy added a commit to meteorlxy/phpmyadmin that referenced this issue Mar 24, 2018
…base-level exports; issue phpmyadmin#14066

Signed-off-by: Xinyu Liu <meteor.lxy@foxmail.com>
meteorlxy added a commit to meteorlxy/phpmyadmin that referenced this issue Mar 24, 2018
…base-level exports; issue phpmyadmin#14066

Signed-off-by: Xinyu Liu <meteor.lxy@foxmail.com>
MauricioFauth added a commit that referenced this issue May 16, 2018
fix: AUTO_INCREMENT error when only exporting table structure in database-level exports; issue #14066
@MauricioFauth MauricioFauth self-assigned this May 16, 2018
@MauricioFauth MauricioFauth added this to the 4.8.1 milestone May 16, 2018
MauricioFauth pushed a commit that referenced this issue May 16, 2018
…base-level exports; issue #14066

Signed-off-by: Xinyu Liu <meteor.lxy@foxmail.com>
(cherry picked from commit f1fa924)
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
MauricioFauth added a commit that referenced this issue May 16, 2018
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A problem or regression with an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants