Bug #97853 | main.ssl-big-packet fails for async client | ||
---|---|---|---|
Submitted: | 2 Dec 2019 18:18 | Modified: | 18 Mar 2020 13:44 |
Reporter: | Manuel Ung | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: C API (client library) | Severity: | S3 (Non-critical) |
Version: | 8.0.17 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[2 Dec 2019 18:18]
Manuel Ung
[2 Dec 2019 18:55]
Manuel Ung
Another possible fix is just to call ppoll with timeout.
[2 Dec 2019 21:15]
MySQL Verification Team
Thank you for the bug report.
[3 Dec 2019 14:11]
Manuel Ung
Actually, the problem here seems to be mysqltest.cc should be listening for both reads/writes with SSL, because writes can happen during reads (and vice versa). This change also fixes the issue: diff --git a/client/mysqltest.cc b/client/mysqltest.cc index bca4a6f3573..639f456fb28 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -857,19 +857,11 @@ static int socket_event_listen(net_async_block_state async_blocking_state, int result; pollfd pfd; pfd.fd = fd; - switch (async_blocking_state) { - case NET_NONBLOCKING_READ: - pfd.events = POLLIN; - break; - case NET_NONBLOCKING_WRITE: - pfd.events = POLLOUT; - break; - case NET_NONBLOCKING_CONNECT: - pfd.events = POLLIN | POLLOUT; - break; - default: - DBUG_ASSERT(false); - } + /* + Listen to both in/out because SSL can perform reads during writes (and + vice versa). + */ + pfd.events = POLLIN | POLLOUT; result = poll(&pfd, 1, -1); if (result < 0) { perror("poll");
[18 Mar 2020 13:44]
Paul DuBois
Posted by developer: Fixed in 8.0.21. Work was done for test suite. No changelog entry required.