Move asking to sql root to the place where its needed, Closes #6435 See merge request !1680
mentioned in commit 9d27652f