Bug #106797 udf_example.so contains deprecated functions
Submitted: 22 Mar 2022 12:57 Modified: 22 Mar 2022 13:15
Reporter: Zuzana Miklankova Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: User-defined functions ( UDF ) Severity:S3 (Non-critical)
Version:8.0.28, 5.7 OS:Any
Assigned to: CPU Architecture:Any

[22 Mar 2022 12:57] Zuzana Miklankova
Description:
Shared object file udf_example.so contains the following deprecated symbols:

gethostbyaddr
gethostbyname
inet_addr
inet_ntoa

"The gethostbyname*() and gethostbyaddr*() functions are obsolete. Applications should use getaddrinfo(3) and getnameinfo(3) instead." [1]

"The inet_addr() function has been obsoleted by inet_aton()." [2]

"The inet_ntoa(3) is now considered to be deprecated in favor of inet_ntop()." [3]

I understand, that the udf_example.so is only an exemplary file that is used to show users how to write their own loadable functions and therefore has no impact on the server's functionality.

Even though, Is there any plan to remove the deprecated functions?

[1] https://linux.die.net/man/3/gethostbyaddr
[2] https://docs.oracle.com/cd/E86824_01/html/E54774/inet-addr-3socket.html
[3] https://man7.org/linux/man-pages/man3/inet_ntop.3.html

How to repeat:
$ # show occurences of above listed deprecated functions
$ cd mysql-server/sql
$ ag gethostbyaddr udf_example.cc
$ ag gethostbyname udf_example.cc
$ ag inet_addr udf_example.cc
$ ag inet_ntoa udf_example.cc
[22 Mar 2022 13:15] MySQL Verification Team
Hello Zuzana Miklankova,

Thank you for the report and feedback.

regards,
Umesh