Skip to content

Commit 25012b3

Browse files
committed
Update Connector/NET tests for recently-fixed bugs.
1 parent 87879c9 commit 25012b3

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

docs/content/tutorials/migrating-from-connector-net.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,10 @@ The following bugs in Connector/NET are fixed by switching to MySqlConnector. (~
280280
* ~~[#101252](https://bugs.mysql.com/bug.php?id=101252): Can't query `CHAR(36)` column containing `NULL`~~
281281
* ~~[#101253](https://bugs.mysql.com/bug.php?id=101253): Default value for `MySqlParameter.Value` changed from null to `0`~~
282282
* ~~[#101302](https://bugs.mysql.com/bug.php?id=101302): Stored Procedure `BOOL` parameter can only be mapped to `MySqlDbType.Byte`~~
283-
* [#101485](https://bugs.mysql.com/bug.php?id=101485): Stored Procedure `JSON` parameter throws “Unhandled type encountered” `MySqlException`
283+
* ~~[#101485](https://bugs.mysql.com/bug.php?id=101485): Stored Procedure `JSON` parameter throws “Unhandled type encountered” `MySqlException`~~
284284
* [#101507](https://bugs.mysql.com/bug.php?id=101507): `MySqlCommand.Cancel` throws `NullReferenceException` for a closed connection
285285
* ~~[#101714](https://bugs.mysql.com/bug.php?id=101714): Extremely slow performance reading result sets~~
286+
* ~~[#102303](https://bugs.mysql.com/bug.php?id=102303): Preparing command with incorrect parameter type puts connection in bad state~~
286287
* [#102593](https://bugs.mysql.com/bug.php?id=102593): Can't use `MemoryStream` as `MySqlParameter.Value`
287288
* ~~[#103390](https://bugs.mysql.com/bug.php?id=103390): Can't query `CHAR(36)` column if `MySqlCommand` is prepared~~
288289
* ~~[#103430](https://bugs.mysql.com/bug.php?id=103430): Can't connect using named pipe on Windows~~

tests/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ with Connector/NET and that [known bugs have been fixed](https://mysqlconnector.
88
The tests require a MySQL server. The simplest way to run one is with [Docker](https://www.docker.com/community-edition):
99

1010
docker run -d --rm --name mysqlconnector -e MYSQL_ROOT_PASSWORD=pass -p 3306:3306 --tmpfs /var/lib/mysql mysql:8.0 --max-allowed-packet=96M --character-set-server=utf8mb4 --log-bin-trust-function-creators=1 --local-infile=1 --max-connections=250
11+
docker exec mysqlconnector mysql -uroot -ppass -e "INSTALL COMPONENT 'file://component_query_attributes';"
1112

1213
Copy the file `SideBySide/config.json.example` to `SideBySide/config.json`, then edit
1314
the `config.json` file in order to connect to your server. If you are using the Docker

tests/SideBySide/QueryTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1429,9 +1429,11 @@ public void QueryAttributeWithEmptyName()
14291429
Assert.Throws<ArgumentException>(() => cmd.Attributes.SetAttribute("", "attr_value"));
14301430
}
14311431

1432-
[SkippableTheory(ServerFeatures.QueryAttributes, Baseline = "https://bugs.mysql.com/bug.php?id=105728")]
1432+
[SkippableTheory(ServerFeatures.QueryAttributes)]
14331433
[InlineData(false)]
1434+
#if !BASELINE // https://bugs.mysql.com/bug.php?id=105728
14341435
[InlineData(true)]
1436+
#endif
14351437
public void QueryAttributeAndParameter(bool prepare)
14361438
{
14371439
using var connection = new MySqlConnection(AppConfig.ConnectionString);

tests/SideBySide/StoredProcedureTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public async Task GetColumnSchemaForNoResultSet(bool prepare)
220220
}
221221
#endif
222222

223-
[SkippableTheory(Baseline = "https://bugs.mysql.com/bug.php?id=102303")]
223+
[Theory]
224224
[InlineData(true)]
225225
[InlineData(false)]
226226
public async Task StoredProcedureOutIncorrectType(bool prepare)
@@ -743,7 +743,7 @@ public void DeriveParametersSetJson()
743743
AssertParameter("@vJson", ParameterDirection.Input, MySqlDbType.JSON));
744744
}
745745

746-
[SkippableFact(ServerFeatures.Json, Baseline = "https://bugs.mysql.com/bug.php?id=101485")]
746+
[SkippableFact(ServerFeatures.Json)]
747747
public void PassJsonParameter()
748748
{
749749
using var cmd = new MySqlCommand("SetJson", m_database.Connection);

0 commit comments

Comments
 (0)