CommandBehavior.SchemaOnly
not working as expected.
#1463
Labels
waiting for answer
Needs more information from the bug reporter
Software versions
MySqlConnector version:
Server type (MySQL, MariaDB, Aurora, etc.) and version: MySQL
Describe the bug
The SchemaOnly command behaviour is not working as expected for DML commands such as insert/update.
When executing CommandBehaviour.SchemaOnly on insert/update statements, it executes the command in the backend which is not the desired behaviour for this command.
Code sample
string query =""
using var command = new MySqlCommand(query, connection) { CommandTimeout = connection.ConnectionTimeout };
MySqlDataReader mysqlDataReader = (MySqlDataReader)await command.ExecuteReaderAsync(CommandBehavior.SchemaOnly, requestCancellationToken).ConfigureAwait(false);
Expected behavior
Only the schema of the table should be returned. The query should not be executed.
The text was updated successfully, but these errors were encountered: