Updating a slave server should not ask for SQL root password
When using the standard update script on a slave server it asks for MySQL master server root password
when in most cases it will remain unused.
Only when you confirm the Reconfigure Permissions in master database?
question do we do operations that need more privileges then the normal $conf['dbmaster_user']
account.
I propose to move the free_query inside the if block.