swap da_sso definers for PROCEDURES/FUNCTIONS

Version 1.61.0

Bugfix
Finished

If you use the one-click single sign-on (SSO) feature for phpMyAdmin, the username used for the login has a prefix of: da_sso_ If an import of a routine or function is done through PMA using this account, it will set the "definer" as this da_sso_* account name. This is only a temporary account, and DA deletes it after it expires, thus leaving the functions/procedures without a valid definer, causing errors such as: Connection failed: SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('da_sso_1234ASDF'@'localhost') does not exist ======== FIX The solution is that when DA runs through the list of da_sso accounts to clear out, if ANY function or procedure in the mysql.proc table has a definer LIKE da\_sso\_%@%, DA will use the "db" column, eg: username_dbname to obtain the actual owner, and swap the definer to be username@<host>, where DA also maintains the host value from the old definer. This check is done anytime the list is saved.. including adding a new value, or with the nightly cron to clear them. ---- T25637

Interested to try DirectAdmin? Get a 30-day Free Trial!