Bug #89327 Contribution by Facebook: Async client ssl support
Submitted: 19 Jan 2018 22:10 Modified: 3 Apr 2019 20:29
Reporter: FBContrib Admin Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S3 (Non-critical)
Version:8.0.3 OS:Any
Assigned to: CPU Architecture:Any

[19 Jan 2018 22:10] FBContrib Admin
Description:
Background innformation provided by Facebook:
Abstract:

This adds SSL support to the Async Client code.

This is 1 of 4 SSL patches.

Repo: https://github.com/mysql/mysql-server
Patch on top of 8.0.3: https://github.com/mysql/mysql-server/commit/020025d9f277fd3283b8c75024f590857f58fbbd
- added a vio_set_blocking function for ssl
- added a writev equivalent when SSL is used: call vio_write to consume the io
  vector.
- don't retry read or write operation if socket in non-blocking, but return to
  caller with the right async_blocking_state.
- async_blocking_state was set multiple times in the call path, removed the
  redundant ones.
- considered the case when after a SSL_write or SSL_read with socket in 
  non-blocking mode, a SSL_SOCKET_WANT_READ or SSL_SOCKET_WANT_WRITE is 
  returned (if renegotiation happens). Set the async_blocking_state accordingly.
- removed hook in tests that disabled SSL and async client tests
- added test for SSL and big packets for both query and response. It's a
  modified copy of big-packets test.

How to repeat:
See description

Suggested fix:
See contribution code attached
[19 Jan 2018 22:10] FBContrib Admin
Async client ssl support 
(*) This code is contributed under the Facebook agreement

Contribution: fb_patch_20.txt (text/plain), 13.21 KiB.

[3 Apr 2019 20:29] Omer Barnir
Thanks to Facebook for submitting this contribution. 
We implement this feature in 8.0.16 as described in wl#11381 (not using the attached code)