MySqlConnector
MySqlConnector copied to clipboard
Trim SQL statements
Related to https://github.com/mysql-net/MySqlConnector/issues/961.
This trims the SQL (from MySqlCommand.CommandText) for non-prepared commands before sending it to the server for execution.
This matches the behaviour of MySqlCommand.Prepare() better, as well as matching Connector/NET's behaviour in some trivial cases.
It does add some increased risk that unusual SQL will be transformed/truncated by this new code and thus introduce new bugs.
It does add some increased risk that unusual SQL will be transformed/truncated by this new code and thus introduce new bugs.
Indeed, the ADO.NET conformance tests found a problem: executing the command -- TODO: write SQL used to work, but now fails.