MySqlConnector icon indicating copy to clipboard operation
MySqlConnector copied to clipboard

Trim SQL statements

Open bgrainger opened this issue 4 years ago • 1 comments
trafficstars

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.

bgrainger avatar Mar 23 '21 00:03 bgrainger

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.

bgrainger avatar Mar 23 '21 17:03 bgrainger