mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
58706b3f7d
------------------------------------------------------------ revno: 2597.37.3 revision-id: sp1r-davi@mysql.com/endora.local-20080328123626-16430 parent: sp1r-anozdrin/alik@quad.opbmk-20080327125300-11290 committer: davi@mysql.com/endora.local timestamp: Fri 2008-03-28 09:36:26 -0300 message: Bug#10374 GET_LOCK does not let connection to close on the server side if it's aborted The problem is that the server doesn't detect aborted connections which are waiting on a lock or sleeping (user sleep), wasting system resources for a connection that is already dead. The solution is to peek at the connection every five seconds to verify if the connection is not aborted. A aborted connection is detect by polling the connection socket for available data to be read or end of file and in case of eof, the wait is aborted and the connection killed.
19 lines
345 B
Text
19 lines
345 B
Text
DROP TABLE IF EXISTS t1;
|
|
CREATE TABLE t1 (n INT);
|
|
INSERT INTO t1 VALUES (1),(2),(3);
|
|
SELECT * FROM t1;
|
|
n
|
|
1
|
|
2
|
|
3
|
|
DROP TABLE t1;
|
|
SELECT GET_LOCK("dangling", 0);
|
|
GET_LOCK("dangling", 0)
|
|
1
|
|
SELECT GET_LOCK('dangling', 3600);;
|
|
SELECT GET_LOCK('dangling', 3600);;
|
|
SELECT RELEASE_LOCK('dangling');
|
|
RELEASE_LOCK('dangling')
|
|
1
|
|
GET_LOCK('dangling', 3600)
|
|
1
|