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

on noop operation, drop ghost table at end #79

Merged
merged 1 commit into from
Jun 22, 2016
Merged

Conversation

shlomi-noach
Copy link
Contributor

To iterate on this; maybe on noop we might want to keep the ghost table around? e.g. to see how it looks after migration?

@shlomi-noach shlomi-noach merged commit 45625a6 into master Jun 22, 2016
@shlomi-noach shlomi-noach deleted the noop-drop-ghost branch June 22, 2016 08:49
@SuperQ
Copy link
Contributor

SuperQ commented Jun 22, 2016 via email

@shlomi-noach
Copy link
Contributor Author

What I don't intend to do is go the pt-online-schema-change way, of infinitely prepending _ if a table name already exists.

It's common practice to issue a noop migration first, followed by a --execute one. I'm looking for the correct way of making this nice and friendly to everyone.

@SuperQ
Copy link
Contributor

SuperQ commented Jun 22, 2016

In LHM, we save the original table with a datestamp to avoid this.

@shlomi-noach
Copy link
Contributor Author

The next concern with that, which is, granted, most of the time not such a big deal, is the max number of characters in table name. It is 64 chars, and I cannot presume to be able to append as large suffix as I would like to.
Having said that, if table name is known to be short enough, that can be arranged.

@SuperQ
Copy link
Contributor

SuperQ commented Jun 22, 2016

Yea, name length is an issue. But the 99% case we can handle things.

One option for NOOP mode is to simply grab the output of SHOW CREATE TABLE or other things before dropping.

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

Successfully merging this pull request may close these issues.

None yet

2 participants