Skip to content

Remove mysql_table_exists() function #815

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

Merged
merged 1 commit into from
Mar 29, 2016
Merged

Remove mysql_table_exists() function #815

merged 1 commit into from
Mar 29, 2016

Conversation

hunner
Copy link
Contributor

@hunner hunner commented Mar 25, 2016

This function is intended to check for the existence of a table before
declaring some resource, but this is neither portable (because functions
run on the master, not the agent) nor one-run idempotent (because the
function would run before mysql is even installed, and would take two
runs to do anything).

The correct way of doing this would be to update the providers and
dependency ordering to handle the conditional states.

Luckily this was never released so it is backwards compatible.

@hunner
Copy link
Contributor Author

hunner commented Mar 25, 2016

@igalic You merged #776 and #777, so it would be great if you could review and merged this. Thanks

@hunner hunner closed this Mar 25, 2016
@hunner hunner deleted the remove_function branch March 25, 2016 18:45
@hunner hunner restored the remove_function branch March 25, 2016 18:45
@hunner hunner reopened this Mar 25, 2016
@hunner
Copy link
Contributor Author

hunner commented Mar 25, 2016

Errors unrelated; #816 fixes them.

This function is intended to check for the existence of a table before
declaring some resource, but this is neither portable (because functions
orun on the master, not the agent) nor one-run idempotent (because the
function would run before mysql is even installed, and would take two
runs to do anything).

The correct way of doing this would be to update the providers and
dependency ordering to handle the conditional states.

Luckily this was never released so it is backwards compatible.
@igalic
Copy link
Contributor

igalic commented Mar 29, 2016

reviews

@igalic igalic merged commit 9501649 into master Mar 29, 2016
@igalic igalic deleted the remove_function branch March 29, 2016 14:18
@cropalato
Copy link

@hunner / @igalic

Can you please let me know what if wrong with that fix?
In my case, I want to be able to skip the grant if the table doesn't exist.
I made my own fix before find that one. But in my case I added a param to decide if I should skip grant command (and show a warning) if skip_missing_table => true (default is false).

Please help me to understand what is wrong and I can address the problem properly.

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

Successfully merging this pull request may close these issues.

4 participants