common_schema icon indicating copy to clipboard operation
common_schema copied to clipboard

updating the code for _sql_accounts_base and sql_grants views to chec…

Open ikewalker opened this issue 9 years ago • 2 comments

…k whether the mysql.user.password column exists or not, and use the authentication_string column in its place if password does not exist

ikewalker avatar May 19 '16 20:05 ikewalker

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.

shlomi-noach avatar May 20 '16 12:05 shlomi-noach

@ikewalker any progress on this?

ahathaway avatar Mar 21 '19 15:03 ahathaway