diff options
author | anozdrin/alik@quad. <> | 2008-03-17 14:26:00 +0300 |
---|---|---|
committer | anozdrin/alik@quad. <> | 2008-03-17 14:26:00 +0300 |
commit | 393c54db5076dd93453a992e67fa136fc88cf359 (patch) | |
tree | dbed4b209c7f0db9b9c6015b42e71bd1761897b8 /sql-common | |
parent | f2b39a5a5b75788554c98b9715de5b125e979ec8 (diff) | |
download | mariadb-git-393c54db5076dd93453a992e67fa136fc88cf359.tar.gz |
Avoid races in connect.test.
The problem was in a test case for Bug33507:
- when the number of active connections reaches the limit,
the server accepts only root connections. That's achieved by
accepting a connection, negotiating with the client and
checking user credentials. If it is not SUPER, the connection
is dropped.
- when the server accepts connection, it increases the counter;
- when the server drops connection, it decreases the counter;
- the race was in between of decreasing the counter and accepting
new connection:
- max_user_connections = 2;
- 2 oridinary user connections accepted;
- extra user connection is establishing;
- server checked user credentials, and sent 'Too many connections'
error;
- the client receives the error and establishes extra SUPER user
connection;
- the server however didn't decrease the counter (the extra
user connection still is "alive" in the server) -- so, the new
SUPER-user connection, will be dropped, because it exceeds
(max_user_connections + 1).
The fix is to implement "safe connect", which makes several attempts
to connect and use it in the test script.
Diffstat (limited to 'sql-common')
0 files changed, 0 insertions, 0 deletions