Details
Description
When the server session uses sql_mode=NO_BACKSLASH_ESCAPES, values are still escaped with a backslash. The server does not treat backslash as an escape character in that mode, so \' leaves the quote closing the string literal and the rest of the value is parsed as SQL.
thanks fg0x0 for the report