@@ -172,8 +172,8 @@ public bool ExistsTable(string name, bool ignoreCase)
172172 public List < DbTableInfo > GetTables ( string [ ] database , string tablename , bool ignoreCase )
173173 {
174174 var loc1 = new List < DbTableInfo > ( ) ;
175- var loc2 = new Dictionary < string , DbTableInfo > ( ) ;
176- var loc3 = new Dictionary < string , Dictionary < string , DbColumnInfo > > ( ) ;
175+ var loc2 = new Dictionary < string , DbTableInfo > ( StringComparer . CurrentCultureIgnoreCase ) ;
176+ var loc3 = new Dictionary < string , Dictionary < string , DbColumnInfo > > ( StringComparer . CurrentCultureIgnoreCase ) ;
177177 string [ ] tbname = null ;
178178 if ( string . IsNullOrEmpty ( tablename ) == false )
179179 {
@@ -228,7 +228,7 @@ from information_schema.tables a
228228 schema = "" ;
229229 }
230230 loc2 . Add ( table_id , new DbTableInfo { Id = table_id , Schema = schema , Name = table , Comment = comment , Type = type } ) ;
231- loc3 . Add ( table_id , new Dictionary < string , DbColumnInfo > ( ) ) ;
231+ loc3 . Add ( table_id , new Dictionary < string , DbColumnInfo > ( StringComparer . CurrentCultureIgnoreCase ) ) ;
232232 switch ( type )
233233 {
234234 case DbTableType . TABLE :
@@ -337,8 +337,8 @@ from information_schema.statistics a
337337 ds = _orm . Ado . ExecuteArray ( CommandType . Text , sql ) ;
338338 if ( ds == null ) return loc1 ;
339339
340- var indexColumns = new Dictionary < string , Dictionary < string , DbIndexInfo > > ( ) ;
341- var uniqueColumns = new Dictionary < string , Dictionary < string , DbIndexInfo > > ( ) ;
340+ var indexColumns = new Dictionary < string , Dictionary < string , DbIndexInfo > > ( StringComparer . CurrentCultureIgnoreCase ) ;
341+ var uniqueColumns = new Dictionary < string , Dictionary < string , DbIndexInfo > > ( StringComparer . CurrentCultureIgnoreCase ) ;
342342 foreach ( var row in ds )
343343 {
344344 string table_id = string . Concat ( row [ 0 ] ) ;
@@ -357,14 +357,14 @@ from information_schema.statistics a
357357 Dictionary < string , DbIndexInfo > loc10 = null ;
358358 DbIndexInfo loc11 = null ;
359359 if ( ! indexColumns . TryGetValue ( table_id , out loc10 ) )
360- indexColumns . Add ( table_id , loc10 = new Dictionary < string , DbIndexInfo > ( ) ) ;
360+ indexColumns . Add ( table_id , loc10 = new Dictionary < string , DbIndexInfo > ( StringComparer . CurrentCultureIgnoreCase ) ) ;
361361 if ( ! loc10 . TryGetValue ( index_id , out loc11 ) )
362362 loc10 . Add ( index_id , loc11 = new DbIndexInfo ( ) ) ;
363363 loc11 . Columns . Add ( new DbIndexColumnInfo { Column = loc9 , IsDesc = is_desc } ) ;
364364 if ( is_unique && ! is_primary_key )
365365 {
366366 if ( ! uniqueColumns . TryGetValue ( table_id , out loc10 ) )
367- uniqueColumns . Add ( table_id , loc10 = new Dictionary < string , DbIndexInfo > ( ) ) ;
367+ uniqueColumns . Add ( table_id , loc10 = new Dictionary < string , DbIndexInfo > ( StringComparer . CurrentCultureIgnoreCase ) ) ;
368368 if ( ! loc10 . TryGetValue ( index_id , out loc11 ) )
369369 loc10 . Add ( index_id , loc11 = new DbIndexInfo ( ) ) ;
370370 loc11 . Columns . Add ( new DbIndexColumnInfo { Column = loc9 , IsDesc = is_desc } ) ;
@@ -400,7 +400,7 @@ from information_schema.key_column_usage a
400400 ds = _orm . Ado . ExecuteArray ( CommandType . Text , sql ) ;
401401 if ( ds == null ) return loc1 ;
402402
403- var fkColumns = new Dictionary < string , Dictionary < string , DbForeignInfo > > ( ) ;
403+ var fkColumns = new Dictionary < string , Dictionary < string , DbForeignInfo > > ( StringComparer . CurrentCultureIgnoreCase ) ;
404404 foreach ( var row in ds )
405405 {
406406 string table_id = string . Concat ( row [ 0 ] ) ;
@@ -423,7 +423,7 @@ from information_schema.key_column_usage a
423423 Dictionary < string , DbForeignInfo > loc12 = null ;
424424 DbForeignInfo loc13 = null ;
425425 if ( ! fkColumns . TryGetValue ( table_id , out loc12 ) )
426- fkColumns . Add ( table_id , loc12 = new Dictionary < string , DbForeignInfo > ( ) ) ;
426+ fkColumns . Add ( table_id , loc12 = new Dictionary < string , DbForeignInfo > ( StringComparer . CurrentCultureIgnoreCase ) ) ;
427427 if ( ! loc12 . TryGetValue ( fk_id , out loc13 ) )
428428 loc12 . Add ( fk_id , loc13 = new DbForeignInfo { Table = loc2 [ table_id ] , ReferencedTable = loc10 } ) ;
429429 loc13 . Columns . Add ( loc9 ) ;
0 commit comments