Skip to content

Commit

Permalink
Change variable name to avoid PUA character. Fixes #1502
Browse files Browse the repository at this point in the history
This should improve compatibility with servers that don't accept Unicode characters in identifiers.
  • Loading branch information
bgrainger committed Oct 6, 2024
1 parent 6010787 commit 0ce83d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/MySqlConnector/Core/ServerSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2131,8 +2131,8 @@ protected override void OnStatementBegin(int index)
private static readonly PayloadData s_setNamesUtf8mb4NoAttributesPayload = QueryPayload.Create(false, "SET NAMES utf8mb4;"u8);
private static readonly PayloadData s_setNamesUtf8WithAttributesPayload = QueryPayload.Create(true, "SET NAMES utf8;"u8);
private static readonly PayloadData s_setNamesUtf8mb4WithAttributesPayload = QueryPayload.Create(true, "SET NAMES utf8mb4;"u8);
private static readonly PayloadData s_sleepNoAttributesPayload = QueryPayload.Create(false, "SELECT SLEEP(0) INTO @\uE001MySqlConnector\uE001Sleep;"u8);
private static readonly PayloadData s_sleepWithAttributesPayload = QueryPayload.Create(true, "SELECT SLEEP(0) INTO @\uE001MySqlConnector\uE001Sleep;"u8);
private static readonly PayloadData s_sleepNoAttributesPayload = QueryPayload.Create(false, "SELECT SLEEP(0) INTO @__MySqlConnector__Sleep;"u8);
private static readonly PayloadData s_sleepWithAttributesPayload = QueryPayload.Create(true, "SELECT SLEEP(0) INTO @__MySqlConnector__Sleep;"u8);
private static readonly PayloadData s_selectConnectionIdVersionNoAttributesPayload = QueryPayload.Create(false, "SELECT CONNECTION_ID(), VERSION();"u8);
private static readonly PayloadData s_selectConnectionIdVersionWithAttributesPayload = QueryPayload.Create(true, "SELECT CONNECTION_ID(), VERSION();"u8);

Expand Down
2 changes: 1 addition & 1 deletion tests/MySqlConnector.Tests/FakeMySqlServerConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public async Task RunAsync(TcpClient client, CancellationToken token)
m_server.CancelQuery(connectionId);
await SendAsync(stream, 1, WriteOk);
}
else if (query == "SELECT SLEEP(0) INTO @\uE001MySqlConnector\uE001Sleep;")
else if (query == "SELECT SLEEP(0) INTO @__MySqlConnector__Sleep;")
{
var wasSet = CancelQueryEvent.Wait(0, token);
await SendAsync(stream, 1, WriteOk);
Expand Down

0 comments on commit 0ce83d7

Please sign in to comment.