Commits

Mike Bayer committed 83ceaf7

merged r4809 from rel_0_4, oracle fix

Comments (0)

Files changed (3)

     - Added support for returning values from inserts (2.0+ only),
       updates and deletes (2.1+ only).
 
+0.4.7
+=====
+- oracle
+    - Oracle get_default_schema_name() "normalizes" the name
+      before returning, meaning it returns a lower-case name
+      when the identifier is detected as case insensitive.
+
 0.4.6
 =====
 - orm

lib/sqlalchemy/databases/oracle.py

             return name.encode(self.encoding)
 
     def get_default_schema_name(self, connection):
-        return connection.execute('SELECT USER FROM DUAL').scalar()
+        return self._normalize_name(connection.execute('SELECT USER FROM DUAL').scalar())
     get_default_schema_name = base.connection_memoize(
         ('dialect', 'default_schema_name'))(get_default_schema_name)
 
         if not dblink:
             dblink = ''
         if not owner:
-            owner = self._denormalize_name(table.schema) or self.get_default_schema_name(connection)
+            owner = self._denormalize_name(table.schema or self.get_default_schema_name(connection))
 
         c = connection.execute ("select COLUMN_NAME, DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, DATA_DEFAULT from ALL_TAB_COLUMNS%(dblink)s where TABLE_NAME = :table_name and OWNER = :owner" % {'dblink':dblink}, {'table_name':actual_name, 'owner':owner})
 

test/engine/reflection.py

     @testing.crashes('firebird', 'No schema support')
     @testing.fails_on('sqlite')
     # fixme: revisit these below.
-    @testing.fails_on('access', 'oracle', 'mssql', 'sybase')
+    @testing.fails_on('access', 'mssql', 'sybase')
     def test_explicit_default_schema(self):
         engine = testing.db