-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for NO_BACKSLASH_ESCAPES #701
Comments
Two possible ways of approaching this problem:
Advantages of the latter: user doesn't have to specify (or guess) the escaping mode; extensible in the future to other modes ( Disadvantages of the latter: performance penalty for checking AFAIK there is no relevant Connector/NET option to be compatible with here. (I think it may always check |
|
Absolutely. Also consider this approach:
It would have the advantage of not triggering an automatic round trip when opening the connection, but only, when the mode is being changed and would detect changes in the mode during the lifetime of the connection.
I think this is a good starting point. |
…derived classes and MySqlParameter. Single Quotes are now always escaped with two single quotes instead of a leading backspace. This addresses everything except triggering/detecting the NO_BACKSLASH_ESCAPES from mysql-net#701 and PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#827
…derived classes and MySqlParameter. Single quotes are now always escaped with an additional single quote instead of a leading backspace. This addresses everything except triggering/detecting the NO_BACKSLASH_ESCAPES from mysql-net#701 and PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#827
…derived classes and MySqlParameter. Single quotes are now always escaped with an additional single quote instead of a leading backspace. This addresses everything except triggering/detecting the NO_BACKSLASH_ESCAPES from mysql-net#701 and PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#827
…derived classes and MySqlParameter. Single quotes are now always escaped with an additional single quote instead of a leading backspace. This addresses everything except triggering/detecting the NO_BACKSLASH_ESCAPES from mysql-net#701 and PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#827 Signed-off-by: Laurents Meyer <[email protected]>
…derived classes and MySqlParameter. Single quotes are now always escaped with an additional single quote instead of a leading backspace. This addresses everything except triggering/detecting the NO_BACKSLASH_ESCAPES from #701 and PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#827 Signed-off-by: Laurents Meyer <[email protected]>
…derived classes and MySqlParameter. Single quotes are now always escaped with an additional single quote instead of a leading backspace. This addresses everything except triggering/detecting the NO_BACKSLASH_ESCAPES from #701 and PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#827 Signed-off-by: Laurents Meyer <[email protected]>
…derived classes and MySqlParameter. Single quotes are now always escaped with an additional single quote instead of a leading backspace. This addresses everything except triggering/detecting the NO_BACKSLASH_ESCAPES from #701 and PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#827 Signed-off-by: Laurents Meyer <[email protected]>
The connection string option is now all that is left to do. Do you want to implement it, or should I? |
I can do it. |
Perfect! I close this one then. |
I plan to ship an updated package later today. |
Added in 0.58.0. |
As previously discussed here:
PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#827
A connection string setting as an opt-in feature activates a special mode in the state machine of
SqlParser
to handle thesql_mode
NO_BACKSLASH_ESCAPES
correctly for strings, when translating parameters into inline literals (e.g. when callingMySqlCommand.Execute
) or splitting the statements (e.g. when callingPrepare
).The text was updated successfully, but these errors were encountered: