common_schema
common_schema copied to clipboard
updating the code for _sql_accounts_base and sql_grants views to chec…
…k whether the mysql.user.password column exists or not, and use the authentication_string column in its place if password does not exist
Hi @ikewalker ,
a simpler solution is to just wrap the CREATE within a try-catch. This is what I do for the Percona views and for the TokuDB views.
See:
- https://github.com/shlomi-noach/common_schema/blob/master/build.xml#L152-L161
- https://github.com/shlomi-noach/common_schema/blob/master/build_data/tokudb_component.sql
or see the complete common_schema....sql file to see how ant generates and wraps the try-catch.
The reason I like this way better is that I don't need to check for conditions. I just try it brute force, and if it works, it works. If not, it fails silently and continues deployment.
@ikewalker any progress on this?