Ben Sturmfels

Ben Sturmfels at

@dw it looks as though it's asking whether the database is connected to the master replica, and if not, frees the memory for the current database query (mysql_free_result), closes the database connection (mysql_close) and halts with a critical error (die). The replica status is an educated guess based on the variable names and https://dev.mysql.com/doc/refman/5.7/en/show-slave-status.html.