diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-03-30 22:15:19 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-03-30 22:15:19 +0000 |
commit | f11e9585b82de03d9ea42f7e19db7729f940dfe6 (patch) | |
tree | 356d282b9e927fa109ff3532337aef3c071cbb08 /lib/sqlalchemy/databases/mysql.py | |
parent | bd0bcc9f57e31bcc9a5f99e22daa6bfe93b24c72 (diff) | |
download | sqlalchemy-f11e9585b82de03d9ea42f7e19db7729f940dfe6.tar.gz |
some cache decorator calls...
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r-- | lib/sqlalchemy/databases/mysql.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index f8be94e2d..c820474c4 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -1542,13 +1542,9 @@ class MySQLDialect(default.DefaultDialect): return False def get_default_schema_name(self, connection): - try: - return self._default_schema_name - except AttributeError: - name = self._default_schema_name = \ - connection.execute('SELECT DATABASE()').scalar() - return name - + return connection.execute('SELECT DATABASE()').scalar() + get_default_schema_name = util.cache_decorator(get_default_schema_name) + def table_names(self, connection, schema): """Return a Unicode SHOW TABLES from a given schema.""" |