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

πŸ’– mysql_rollback β€” ok so hear me out bestie πŸ’–

MariaDB Connector/C manual, section 3, and babes, it's literally just one function. Cute. Manageable. Let's go. πŸŽ€


✨ NAME ✨

mysql_rollback β€” rolls back the current transaction 🫢


🌸 SYNOPSIS 🌸

#include <mysql.h>

my_bool mysql_rollback(MYSQL * mysql);

That's the whole vibe. One line. One function. Slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so what does it do? It rolls back the current transaction for the database. That's it. That's the function. Undo era. 🫧

Returns zero on success, and nonzero if an error occurred. No cap, that's the entire return situation.


πŸ’œ PARAMETER πŸ’œ

  • mysql β€” a mysql handle, which was previously allocated by mysql_init(3) and connected by mysql_real_connect(3). Like, it has to be a real live handle bestie, not some imaginary one you manifested. 🌈

πŸŽ€ NOTES πŸŽ€

⚠️ vibe check warning: mysql_rollback() will not work as expected if autocommit mode was set or the storage engine does not support transactions. So if you set autocommit or you're on a non-transactional engine, this function is giving… nothing. πŸ’€ Do with that information what you will.

⭐ SEE ALSO ⭐

Like, the whole transactional bestie trio fr fr. Go read them. 🧚


πŸ‘‘ THE SIGN-OFF πŸ‘‘

This was Version 3.4 of the MariaDB Connector/C page for mysql_rollback(3). That's the whole thing, bestie β€” transaction rolled back, page fully read, main character energy achieved. Go forth and ROLLBACK. πŸ’–βœ¨πŸŒΈπŸ¦‹πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from