Skip to content

Conversation

@azat
Copy link
Member

@azat azat commented Jul 1, 2024

azat and others added 6 commits July 1, 2024 11:33
The return value of SSL_read indicates an error if it is <= 0, not
if it is < 0.

(cherry picked from commit f1b08b8)
wait_io_or_timeout() accepts milliseconds, while options has seconds,
since this is just plain MYSQL_OPT_READ_TIMEOUT/...

The one that has milliseconds are pvio->timeout[PVIO_*_TIMEOUT], so use
them.

Usually this is not a problem, but, in case of interrupt (i.e. signal -
EINTR) SSL_read() will return SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE,
and then wait_io_or_timeout() will be called, and timeout will be wrong,
may cause a failure.
* me/ch/wait_io_or_timeout-fixes:
  Fix usage of wait_io_or_timeout from TLS layers
* me/ch/SSL_read:
  Partial fix for MDEV-27405:
…o 3.1

* me/ch/wait_io_or_timeout-write-fix:
  Fix calling wait_io_or_timeout() (pass is_read properly for writes)
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ azat
❌ 9EOR9
You have signed the CLA already but the status is still pending? Let us recheck it.

@alexey-milovidov alexey-milovidov merged commit d0a788c into ClickHouse:3.1 Jul 1, 2024
@alexey-milovidov alexey-milovidov self-assigned this Jul 1, 2024
@azat azat deleted the ch/next branch July 1, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants