
The get_server_info function takes the monitor handle and a database and returns the corresponding MYSQL_SERVER_INFO struct. This hides a part of the actual implementation of the info struct from the monitor code, allowing future refactoring to be done. It also makes the code a bit more readable.