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

Mixing MyISAM and InnoDB tables #188

Closed
sebastfr opened this issue Jan 20, 2014 · 3 comments
Closed

Mixing MyISAM and InnoDB tables #188

sebastfr opened this issue Jan 20, 2014 · 3 comments

Comments

@sebastfr
Copy link

@sebastfr sebastfr commented Jan 20, 2014

InnoDB became the default engine for MySQL since v5.5 which is installed on recent Ubuntu (and probably others).

Upgrading a repository which had MyISAM tables (the former default) may end up in the repo DB having a mix between MyISAM and InnoDB tables.

EPrints (Database/mysql.pm) should always set a default engine (on create tables) to prevent this situation from happening. Alternatively $c->{dbengine} = 'MyISAM' can be set in the local config.

@sebastfr
Copy link
Author

@sebastfr sebastfr commented Jan 20, 2014

1- need a fix for new eprints users - cf description above
2- need a "fix", instructions or a script for IR's which have mixed tables.

@drn05r
Copy link
Contributor

@drn05r drn05r commented Aug 5, 2019

I have added a page to the wiki to provide a script for converting the database tables:

https://wiki.eprints.org/w/Converting_MyISAM_tables_to_InnoDB

@jesusbagpuss
Copy link
Contributor

@jesusbagpuss jesusbagpuss commented Aug 5, 2019

@drn05r I think there might be some additional checks that should be made with your script.
This thread is related: http://threader.ecs.soton.ac.uk/lists/eprints_tech/21835.html
where some tables end up without a primary key.
In this situation, as I understand it, InnoDB will create an index in the background for itself, but an application would not then be able to use it.
Defining a PK before altering the table engine it probably a good idea.

It would probably be worth linking to some information about the storage size of InnoDB vs MyISAM too - don't want someone to fill their server up trying to change the DB engine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants