mysql_ping(3)

πŸ“¦
version 13.0.2 Β· 5 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay so bestie, this is mysql_ping(3) from MariaDB Connector/C β€” the function that checks if the connection between client and server is working. 🫢

✨ SYNOPSIS ✨

#include <mysql.h>

int mysql_ping(MYSQL * mysql);

🌸 DESCRIPTION 🌸

Checks whether the connection to the server is working. If it has gone down, and the global option reconnect is enabled, an automatic reconnection is attempted. πŸ”„

This function can be used by clients that remain idle for a long while, to check whether the server has closed the connection and reconnect if necessary. πŸ’…

πŸŽ€ PARAMETERS πŸŽ€

🫢 NOTES 🫢

  • If a reconnect occurred the thread_id will change. Also resources bundled to the connection (prepared statements, locks, temporary tables, ...) will be released. 😭
⚠️ Important: if a reconnect occurred, the thread_id will change, and resources bundled to the connection (prepared statements, locks, temporary tables, ...) will be released. πŸ’€

🌈 RETURN VALUE 🌈

Returns zero on success, nonzero if an error occurred. βœ…βŒ

πŸ‘‘ SEE ALSO πŸ‘‘


Source: MariaDB Connector/C β€” Version 3.4. That's the footer energy, bestie. No cap. πŸ’…βœ¨

πŸ“¦ where this page comes from