Completing fix to bug #565,  http://bugs.mariadb.com/show_bug.cgi?id=565
Client's flags are also used when changing the user inside the session.