Open
Description
Is your feature request related to a problem? Please describe.
When Allow User Variables=False, MySql.Data can use @` to ignore missing variables.
For example
var connectionString = "Server=127.0.0.1;User ID=root;Password=123456;Database=test;Allow User Variables=False";
using var connection = new MySql.Data.MySqlClient.MySqlConnection(connectionString);
var sql = @"SELECT 1 INTO @`a`; SELECT @`a`;";
try
{
int a = await connection.QuerySingleOrDefaultAsync<int>(sql);
Console.WriteLine($"a: {a}");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Output:
a: 1
Describe the solution you'd like
Do this in a similar way.
Additional context
I like to use Allow User Variables=False to avoid typos, but I need a way to use variables in special cases.