[SQLAlchemy] Default selected DB does not seem to be used
@@ -227,6 +227,9 @@ class SqlAlchemyApi(Api):
self.interpreter.get('dialect_properties') and self.interpreter['dialect_properties']['trim_statement_semicolon']:
statement = statement.strip().rstrip(';')
+ if snippet.get('database'):
+ connection.execute('USE ' + snippet['database'])
+
result = connection.execute(statement)
cache = {
