File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
src/MySqlConnector/MySql.Data.MySqlClient Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -362,7 +362,7 @@ internal DataTable BuildSchemaTable()
362
362
{
363
363
var colDefinitions = GetResultSet ( ) . ColumnDefinitions ;
364
364
if ( colDefinitions is null )
365
- return null ;
365
+ throw new InvalidOperationException ( "There is no current result set." ) ;
366
366
DataTable schemaTable = new DataTable ( "SchemaTable" ) ;
367
367
schemaTable . Locale = CultureInfo . InvariantCulture ;
368
368
schemaTable . MinimumCapacity = colDefinitions . Length ;
Original file line number Diff line number Diff line change @@ -12,8 +12,5 @@ public DataReaderTests(SelectValueFixture fixture)
12
12
13
13
[ Fact ( Skip = "Deliberately throws InvalidCastException" ) ]
14
14
public override void GetTextReader_returns_empty_for_null_String ( ) { }
15
-
16
- [ Fact ( Skip = "https://github.com/mysql-net/MySqlConnector/issues/678" ) ]
17
- public override void GetSchemaTable_throws_after_Delete ( ) { }
18
15
}
19
16
}
Original file line number Diff line number Diff line change @@ -1227,7 +1227,11 @@ public void GetSchemaTableAfterNextResult()
1227
1227
}
1228
1228
1229
1229
Assert . False ( reader . NextResult ( ) ) ;
1230
+ #if BASELINE
1230
1231
Assert . Null ( reader . GetSchemaTable ( ) ) ;
1232
+ #else
1233
+ Assert . Throws < InvalidOperationException > ( ( ) => reader . GetSchemaTable ( ) ) ;
1234
+ #endif
1231
1235
}
1232
1236
}
1233
1237
}
You can’t perform that action at this time.
0 commit comments