Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
2.3.1
-
None
-
None
-
None
Description
When on a "slow network" and trying to connect to a backend using SSL and non-blocking API (mysql_real_connect_start/mysql_real_connect_cont), it results in an error "2013: Lost connection to MySQL server at 'reading authorization packet'" , due to system error 11 (Resource temporarily unavailable).
The issue seems caused by the fact that mthd_my_real_connect() calls run_plugin_auth() . This one calls net_safe_read(), that calls my_net_read() , and if this one returns "packet_error" the connection is immediatelyterminated .
my_net_read() returns "packet_error" when there is no data to read from the socket: this shouldn't be considered an error during non-blocking calls.
In other words, it seems that when establishing an SSL connection the library behaves correctly only on fast networks as data will be immediately available to read.