Bug #74135 MySqlScript does not have a CommandTimeout property

Submitted: 29 Sep 2014 12:59 Modified: 29 Sep 22:35
Reporter: Vilhelm Heiberg Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version: OS:Windows
Assigned to: Jose Ramirez Ruiz CPU Architecture:Any
Tags: MySqlScript timeout

[29 Sep 2014 12:59] Vilhelm Heiberg
Description:
The MySqlScript class is a wrapper around the MySqlCommand class.
The MySqlCommand class has the property CommandTimeout.
My request is the extend the MySqlScript class to have the property CommandTimeout to be able to execute timeconsuming scripts.

I have peeked at the code of the MySqlScript class, and this seems like a very easy thing to implement.

How to repeat:

 using (MySqlConnection connection = new MySqlConnection(this._connectionstring))
                {
                    connection.Open();
                    MySqlScript cmd = new MySqlScript(connection, script);
                    cmd.Error += new MySqlScriptErrorEventHandler(cmd_Error);
                    return cmd.Execute();
                }

Suggested fix:
Inside the Execute() method of the MySqlScript class set the CommandTimeout of the MySqlCommand object after it is initialized.
[22 Oct 2014 19:31] Fernando Gonzalez.Sanchez
Thanks for your bug report.

Yes, it is easy to verify this.

The current workaround is to set the "DefaultCommandTimeout" in the connection string passed to the desired value.

The MySqlCommand takes its default value from there.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.