Bug #58192 | User to KILL the time-out'ed sessions | ||
---|---|---|---|
Submitted: | 15 Nov 2010 5:47 | Modified: | 8 Dec 2010 6:46 |
Reporter: | Mikiya Okuno | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S4 (Feature request) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any |
[15 Nov 2010 5:47]
Mikiya Okuno
[15 Nov 2010 6:55]
Tonci Grgin
Yes, Mikiya, I agree with you but then again, what to do with, say, query that was load-balanced to another server instance? Maybe there even more such corner cases that can not be handled easily. My opinion is one simply should not use the timeout if he/she does not know what is actually going on. IMO, this is a case for documentation.
[15 Nov 2010 8:58]
MySQL Verification Team
Hi Tonci, The problem is that a user cannot timeout queries if necessary. A user may think "this query should finish or timeout in 10 secounds." But Connector/J cannot KILL the query if the query is executing stored routines as a different user. This is bad. One problem is a response. So, here's another solution. If the driver can close the session when timeout is reached, the client application can get back the control and decide what to do next. (Return an error to the user or retry etc) Closing a session does not require SUPER privilege.
[15 Nov 2010 17:10]
Tonci Grgin
Mikiya, courtesy of master Mark, here's the property you've been looking for (I hope): queryTimeoutKillsConnection (http://dev.mysql.com/doc/refman/5.5/en/connector-j-reference-configuration-properties.html) Please see if it fits your needs.
[8 Dec 2010 6:31]
MySQL Verification Team
Hi Tonci, I'm sorry for my slow response. Thank you for your pointing it out. The parameter perfectly fits! Cheers.
[8 Dec 2010 6:46]
Tonci Grgin
Closing the report now.