Database-level configuration option for 'COLLATE DATABASE_DEFAULT'
There should be a database-level configuration option to implicitly add the clause 'COLLATE DATABASE_DEFAULT' wherever it has not been already defined, e.g. in a CREATE TABLE statement of a temporary table. In this way, we can avoid modifying all SQL statements to handle cases with different collations between master and user databases. We should also be able to override this setting with a session-level SET option.