diff options
Diffstat (limited to 'oslo_db')
-rw-r--r-- | oslo_db/sqlalchemy/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/oslo_db/sqlalchemy/utils.py b/oslo_db/sqlalchemy/utils.py index 3a6a993..e5b3531 100644 --- a/oslo_db/sqlalchemy/utils.py +++ b/oslo_db/sqlalchemy/utils.py @@ -1162,7 +1162,9 @@ def get_non_ndbcluster_tables(connectable, skip_tables=None): params['database'] = connectable.engine.url.database query = text(query_str) - nonndbcluster = connectable.execute(query, **params) + # TODO(stephenfin): What about if this is already a Connection? + with connectable.connect() as conn, conn.begin(): + nonndbcluster = connectable.execute(query, **params) return [i[0] for i in nonndbcluster] |