Description:
Sybase provides a default database for each user, which is set automatically on login. Provide similar functionality for MySQL.
How to repeat:
mysql -u userName
SELECT DATABASE(); -- should automatically be set to default database for the given userName
Suggested fix:
If the USE statement were allowed in prepared statements, then we could write this into an init-connect statement.
Or, DATABASE() could accept a parameter that would set the current database to the given parameter.
Or, the privilege system could be extended to include a default database for each user in the mysql.user table.