mysql_error(3)

πŸ“¦
version 13.0.2 Β· 4 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 bestie, meet mysql_error πŸ’– β€” it returns the last error message for the most recent function call. no cap.

This one lives in MariaDB Connector/C, and the manual page is mysql_error(3). 🫢


✨ Synopsis ✨

here's the exact spell, bestie:

#include <mysql.h>

const char * mysql_error(MYSQL * mysql);

πŸ’– Description πŸ’–

so what it does: mysql_error() returns the last error message for the most recent function call that can succeed or fail. that's the whole assignment. πŸ’…

if you get an empty string, that means no error occurred. iconic behavior, honestly. πŸ“


🌸 Parameter 🌸


πŸ¦‹ Notes πŸ¦‹

  • Client error codes are listed in the errmsg.h header file, and server error codes are listed in the mysqld_error.h header file of the server source distribution. πŸ‘€
  • Client error messages can be obtained by calling mariadb_get_infov(3) and passing the parameter MARIADB_CLIENT_ERRORS. ✨

πŸ‘‘ See also πŸ‘‘


that's the whole page from MariaDB Connector/C, Version 3.4, bestie β€” no date on the footer, just vibes. mysql_error(3), signing off. πŸ’…πŸ«Ά

πŸ“¦ where this page comes from