mysql_stmt_reset(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

✨ mysql_stmt_reset ✨

okay bestie, so you know how you can prepare a statement and it just sits there, all ready and waiting? well this little function is the "hit the reset button" of the prepared statement world πŸ’… and honestly? it's giving fresh start energy.

This page lives in the MariaDB Connector/C manual, and yes, it's the glow-up of mysql_stmt_reset(3).


🌸 SYNOPSIS 🌸

#include <mysql.h>

my_bool mysql_stmt_reset(MYSQL_STMT * stmt);

πŸŽ€ DESCRIPTION πŸŽ€

Resets a prepared statement on client and server to the state it was in right after prepare. like, memory-wipe but make it legal πŸ’–


πŸ¦‹ PARAMETER πŸ¦‹

  • stmt β€” a statement handle, which was previously allocated by mysql_stmt_init(3). Returns zero on success, nonzero if an error occurred.

⭐ RETURN VALUE ⭐

Returns zero on success, and 1 if an error occurred. no cap, that's the whole vibe check.


πŸ’œ NOTES πŸ’œ

  • mysql_stmt_reset() resets the statement on the server, unbuffered result sets and errors. Bindings and stored result sets will not be cleared. The latter one will be cleared when re-executing or closing the prepared statement. (yes bestie, it's picky about what it forgets πŸ™ˆ)
  • To reprepare a prepared statement with another SQL statement use mysql_stmt_prepare(3).

🌈 SEE ALSO 🌈


okay that's the whole page, go reset something (responsibly) 🫢

Version 3.4 of the MariaDB Connector/C manual, <pink>mysql_stmt_reset(3)</pink> β€” mwah, iconic, bye bestie πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from