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

ZIP Export with discrete table files have indexes elsewhere! #15386

Open
cdp1337 opened this issue Jul 11, 2019 · 5 comments
Open

ZIP Export with discrete table files have indexes elsewhere! #15386

cdp1337 opened this issue Jul 11, 2019 · 5 comments
Labels
affects/5.2 This issue or pull-request affects 5.2.x releases (and maybe further versions) parser question Used when we need feedback from the submitter or when the issue is a question about PMA
Projects

Comments

@cdp1337
Copy link

cdp1337 commented Jul 11, 2019

PHPMyAdmin version 4.8.5
OS: CentOS (CPanel specifically)

Actions:

Select table, browse to export, expand Custom, select "Export tables as separate files". Leave all other options default.

Expected Behaviour:

Get a zip with each table self contained in its own file.

Actual Behaviour:

Got a zip (great), with each table self contained in its own file, (so far so good), WITH NO INDEXES OR AUTO INCREMENT DECLARATIONS!

For a brief example:

In %dbname%_table_blog.sql:

-- --------------------------------------------------------

--
-- Table structure for table `blog`
--

CREATE TABLE `blog` (
  `id` char(32) COLLATE utf8_unicode_ci NOT NULL,
  `site` int(15) NOT NULL DEFAULT 0 COMMENT 'The site id in multisite mode, (or -1 if global)',
  `type` enum('local','remote') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'local',
  `manage_articles_permission` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '!*',
  `remote_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `blog`
--

INSERT INTO `blog` (`id`, `site`, `type`, `manage_articles_permission`, `remote_url`) VALUES
('1', 0, 'local', '!*', '');

Note the lack of indexes!

Then in %dbname%_extra.sql, we have:

--
-- Indexes for table `blog`
--
ALTER TABLE `blog`
  ADD PRIMARY KEY (`id`);

... along with every other table, grouped together in a very inconvenient fashion.


Want to know the quickest way to slow a large application to a crawl? Import a table to replace some specific set of functionality with production data, WITHOUT THE INDEXES!

I did some hunting through the options provided in the export page, but nothing screamed Export Indexes Separately. Is there any option to not use this %dbname%_extra.sql file, but instead just keep the indexes along with the table contents where they're expected to be by any sane developer?

@cdp1337
Copy link
Author

cdp1337 commented Jul 11, 2019

As an immediate follow up, if this is not native upstream functionality, but instead some CPanel / WHM trickery, I'm more than happy to yell at them instead! :)

@cdp1337
Copy link
Author

cdp1337 commented Jul 11, 2019

After sleeping on this this issue, I came to the realization that historically I may not have used table-specific exports before from PMA, but instead always used mysqldump in conjunction with a custom foreach table ... script to achieve this. For this particular instance, I did not have shell access, so had to resort to the web interface to achieve a similar result. Since individual table files were provided, I simply had the blind expectation that the table file would be fully self contained with all necessary directives.

SO...... feature request!? ^_^

@williamdes
Copy link
Member

@cdp1337 I need to investigate what you sent us, will keep you updated ^^

@williamdes williamdes added the question Used when we need feedback from the submitter or when the issue is a question about PMA label Oct 22, 2019
@williamdes williamdes self-assigned this Oct 22, 2019
@williamdes williamdes removed their assignment Dec 24, 2019
@williamdes williamdes added this to Needs triage in Questions Jan 23, 2020
@williamdes williamdes moved this from Needs triage to Needs a second check to be a bug in Questions Jan 23, 2020
@williamdes
Copy link
Member

Hi @cdp1337

Do you think this issue is still accurate with 5.0 versions ?

@williamdes williamdes added this to the 5.1.3 milestone Aug 24, 2021
@williamdes
Copy link
Member

Hi @cdp1337
I am not sure you will get this notification but just in case, could let us know if 5.1 versions fix this issue ?
Because we are missing your original table example reproducing is complicated or impossible :/

@ibennetch ibennetch modified the milestones: 5.1.3, 5.1.4 Feb 11, 2022
@ibennetch ibennetch modified the milestones: 5.1.4, 5.2.1 May 11, 2022
@williamdes williamdes added the affects/5.2 This issue or pull-request affects 5.2.x releases (and maybe further versions) label Oct 25, 2022
@williamdes williamdes removed this from the 5.2.1 milestone Oct 25, 2022
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) parser question Used when we need feedback from the submitter or when the issue is a question about PMA
Projects
Questions
  
Needs a second check to be a bug
Development

No branches or pull requests

3 participants