Skip to content

Commit 53e0ffc

Browse files
committed
Test that periods are supported in procedure names.
1 parent 6e3affa commit 53e0ffc

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ supported in MySqlConnector, see the [Connection Options](connection-options)
4848
* [#78760](https://bugs.mysql.com/bug.php?id=78760): Error when using tabs and newlines in SQL statements
4949
* [#78917](https://bugs.mysql.com/bug.php?id=78917): `TINYINT(1)` values start being returned as `sbyte` after `NULL`
5050
* [#81650](https://bugs.mysql.com/bug.php?id=81650): `Server` connection string option may now contain multiple, comma separated hosts that will be tried in order until a connection succeeds
51+
* [#84220](https://bugs.mysql.com/bug.php?id=84220): Cannot call a stored procedure with `.` in its name

tests/SideBySide/StoredProcedureFixture.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ create procedure number_lister (inout high int)
8080
END WHILE;
8181
SET high = high + 1;
8282
end;");
83+
Connection.Execute(@"drop procedure if exists `dotted.name`;
84+
create procedure `dotted.name`()
85+
begin
86+
select 1, 2, 3;
87+
end;");
8388
}
8489
}
8590
}

tests/SideBySide/StoredProcedureTests.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,31 @@ public async Task InOut()
337337
}
338338
}
339339

340+
[Theory
341+
#if BASELINE
342+
(Skip = "https://bugs.mysql.com/bug.php?id=84220")
343+
#endif
344+
]
345+
[InlineData(false)]
346+
[InlineData(true)]
347+
public async Task DottedName(bool useDatabaseName)
348+
{
349+
using (var cmd = m_database.Connection.CreateCommand())
350+
{
351+
cmd.CommandText = (useDatabaseName ? $"{m_database.Connection.Database}." : "") + "`dotted.name`";
352+
cmd.CommandType = CommandType.StoredProcedure;
353+
using (var reader = await cmd.ExecuteReaderAsync())
354+
{
355+
Assert.True(await reader.ReadAsync());
356+
Assert.Equal(1, reader.GetInt32(0));
357+
Assert.Equal(2, reader.GetInt32(1));
358+
Assert.Equal(3, reader.GetInt32(2));
359+
Assert.False(await reader.ReadAsync());
360+
Assert.False(await reader.NextResultAsync());
361+
}
362+
}
363+
}
364+
340365
readonly DatabaseFixture m_database;
341366
}
342367
}

0 commit comments

Comments
 (0)