Question

I am trying to understand MySqlCommand CommandTimeout . If it is zero , does it mean "indefinite" ?

Was it helpful?

Solution

According to the official documentation, it does seem that 0 means indefinite.

The default value is 30 secs. A value of 0 indicates an indefinite wait and should be avoided. Note the default command timeout can be changed using the connection string option Default Command Timeout.

(emphasis mine)

However, this post from October 2006 seems to indicates otherwise. Most likely the implementation has been modified since that post was made to match the official documentation. The best thing to do is give it a try and see what happens :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top