8000 Change variable name to avoid PUA character. Fixes #1502 · mysql-net/MySqlConnector@0ce83d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0ce83d7

Browse files
committed
Change variable name to avoid PUA character. Fixes #1502
This should improve compatibility with servers that don't accept Unicode characters in identifiers.
1 parent 6010787 commit 0ce83d7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/MySqlConnector/Core/ServerSession.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,8 +2131,8 @@ protected override void OnStatementBegin(int index)
21312131
private static readonly PayloadData s_setNamesUtf8mb4NoAttributesPayload = QueryPayload.Create(false, "SET NAMES utf8mb4;"u8);
21322132
private static readonly PayloadData s_setNamesUtf8WithAttributesPayload = QueryPayload.Create(true, "SET NAMES utf8;"u8);
21332133
private static readonly PayloadData s_setNamesUtf8mb4WithAttributesPayload = QueryPayload.Create(true, "SET NAMES utf8mb4;"u8);
2134-
private static readonly PayloadData s_sleepNoAttributesPayload = QueryPayload.Create(false, "SELECT SLEEP(0) INTO @\uE001MySqlConnector\uE001Sleep;"u8);
2135-
private static readonly PayloadData s_sleepWithAttributesPayload = QueryPayload.Create(true, "SELECT SLEEP(0) INTO @\uE001MySqlConnector\uE001Sleep;"u8);
2134+
private static readonly PayloadData s_sleepNoAttributesPayload = QueryPayload.Create(false, "SELECT SLEEP(0) INTO @__MySqlConnector__Sleep;"u8);
2135+
private static readonly PayloadData s_sleepWithAttributesPayload = QueryPayload.Create(true, "SELECT SLEEP(0) INTO @__MySqlConnector__Sleep;"u8);
21362136
private static readonly PayloadData s_selectConnectionIdVersionNoAttributesPayload = QueryPayload.Create(false, "SELECT CONNECTION_ID(), VERSION();"u8);
21372137
private static readonly PayloadData s_selectConnectionIdVersionWithAttributesPayload = QueryPayload.Create(true, "SELECT CONNECTION_ID(), VERSION();"u8);
21382138

tests/MySqlConnector.Tests/FakeMySqlServerConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public async Task RunAsync(TcpClient client, CancellationToken token)
158158
m_server.CancelQuery(connectionId);
159159
await SendAsync(stream, 1, WriteOk);
160160
}
161-
else if (query == "SELECT SLEEP(0) INTO @\uE001MySqlConnector\uE001Sleep;")
161+
else if (query == "SELECT SLEEP(0) INTO @__MySqlConnector__Sleep;")
162162
{
163163
var wasSet = CancelQueryEvent.Wait(0, token);
164164
await SendAsync(stream, 1, WriteOk);

0 commit comments

Comments
 (0)
0