Skip to content

Commit 7bcd38e

Browse files
iamcarbonbgrainger
authored andcommitted
Eliminate allocation in OnStatementBegin
Signed-off-by: Jason Nelson <[email protected]> (cherry picked from commit 37e2d9e)
1 parent 532cbff commit 7bcd38e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MySqlConnector/Core/ServerSession.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,7 @@ public DelimiterSqlParser(IMySqlCommand command)
19121912

19131913
protected override void OnStatementBegin(int index)
19141914
{
1915-
if (index + 10 < m_sql.Length && string.Equals("delimiter ", m_sql.Substring(index, 10), StringComparison.OrdinalIgnoreCase))
1915+
if (index + 10 < m_sql.Length && m_sql.AsSpan(index, 10).Equals("delimiter ".AsSpan(), StringComparison.OrdinalIgnoreCase))
19161916
HasDelimiter = true;
19171917
}
19181918

0 commit comments

Comments
 (0)