diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-07-14 19:16:11 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-07-14 19:16:11 -0400 |
| commit | 6fd0bc7c62849a1dc34ca7d93aeeaaff25897648 (patch) | |
| tree | 59fd8ef07742640eed25f44b6d47e54fc4f5260e /lib | |
| parent | 2825730e7be6e18aac32bcef4f6eeb0a5acab2a0 (diff) | |
| download | sqlalchemy-6fd0bc7c62849a1dc34ca7d93aeeaaff25897648.tar.gz | |
- Fixed a regression from 0.9.5 caused by :ticket:`3025` where the
query used to determine "default schema" is invalid in SQL Server 2000.
For SQL Server 2000 we go back to defaulting to the "schema name"
parameter of the dialect, which is configurable but defaults
to 'dbo'. fixes #3025
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sqlalchemy/dialects/mssql/base.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index eebd35405..473f7df06 100644 --- a/lib/sqlalchemy/dialects/mssql/base.py +++ b/lib/sqlalchemy/dialects/mssql/base.py @@ -1365,6 +1365,9 @@ class MSDialect(default.DefaultDialect): self.supports_multivalues_insert = True def _get_default_schema_name(self, connection): + if self.server_version_info < MS_2005_VERSION: + return self.schema_name + query = sql.text(""" SELECT default_schema_name FROM sys.database_principals |
