Bug #49099 network_address_set_address should be reentrant (mt-safe)

Submitted: 25 Nov 2009 13:06 Modified: 9 Jan 2015 10:34
Reporter: Dyre Tjeldvoll Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Proxy: Core Severity:S4 (Feature request)
Version:0.7.0 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[25 Nov 2009 13:06] Dyre Tjeldvoll
Description:
network_address_set_address()->network_address_set_address_ip() calls gethostbyname() which is not reentrant. This means that an mt-plugin must guard all calls to network_address_set_address() with a mutex. Which is doable, but somewhat inconvenient.

How to repeat:
Create mt-plugin with multiple threads which call network_address_set_address(). 

Suggested fix:
If proxy itself decides to go mt gethostbyname will probably have to be changed to gethostbyname_r.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.