@@ -45,7 +45,7 @@ public override Schema ExtractSchema(string catalogName, string schemaName)
45
45
{
46
46
targetSchemes . Clear ( ) ;
47
47
theCatalog = new Catalog ( catalogName ) ;
48
- var targetSchema = schemaName . ToUpperInvariant ( ) ;
48
+ var targetSchema = ToUpperInvariantIfNeeded ( schemaName ) ;
49
49
targetSchemes . Add ( targetSchema ) ;
50
50
51
51
RegisterReplacements ( replacementsRegistry ) ;
@@ -60,7 +60,7 @@ public override Catalog ExtractSchemes(string catalogName, string[] schemaNames)
60
60
theCatalog = new Catalog ( catalogName ) ;
61
61
targetSchemes . Clear ( ) ;
62
62
foreach ( var schemaName in schemaNames ) {
63
- var targetSchema = schemaName . ToUpperInvariant ( ) ;
63
+ var targetSchema = ToUpperInvariantIfNeeded ( schemaName ) ;
64
64
targetSchemes . Add ( targetSchema ) ;
65
65
}
66
66
@@ -71,6 +71,11 @@ public override Catalog ExtractSchemes(string catalogName, string[] schemaNames)
71
71
return theCatalog ;
72
72
}
73
73
74
+ protected virtual string ToUpperInvariantIfNeeded ( string schemaName )
75
+ {
76
+ return schemaName . ToUpperInvariant ( ) ;
77
+ }
78
+
74
79
private void ExtractCatalogContents ( )
75
80
{
76
81
ExtractTables ( ) ;
@@ -92,7 +97,7 @@ private void ExtractSchemas()
92
97
while ( reader . Read ( ) )
93
98
theCatalog . CreateSchema ( reader . GetString ( 0 ) ) ;
94
99
// choosing the default schema
95
- var defaultSchemaName = Driver . CoreServerInfo . DefaultSchemaName . ToUpperInvariant ( ) ;
100
+ var defaultSchemaName = ToUpperInvariantIfNeeded ( Driver . CoreServerInfo . DefaultSchemaName ) . ToUpperInvariant ( ) ;
96
101
var defaultSchema = theCatalog . Schemas [ defaultSchemaName ] ;
97
102
theCatalog . DefaultSchema = defaultSchema ;
98
103
}
0 commit comments