mysql_info(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 so bestie, meet mysql_info(3) from MariaDB Connector/C β€” she provides information about the last executed statement. No cap, that's the whole assignment, and she ate. πŸ’…βœ¨


🌸 SYNOPSIS 🌸

#include <mysql.h>

const char * mysql_info(MYSQL * mysql);

πŸŽ€ DESCRIPTION πŸŽ€

The mysql_info() function returns a string providing information about the last statement executed. Lowkey iconic for peeking at what just happened. Periodt. πŸ‘‘


πŸ¦‹ PARAMETER πŸ¦‹

  • mysql β€” a connection identifier, which was previously allocated by mysql_init(3) and connected by mysql_real_connect(3). Like, she needs to already be alive and connected, bestie. 🫢

πŸ’… NOTES πŸ’…

Statements which do not fall into one of the preceding formats are not supported (e.g. SELECT). In these situations mysql_info() will return an empty string. So if you ask about a SELECT, don't expect lore β€” she's giving nothing. 😭


πŸ‘‘ RETURN VALUE πŸ‘‘

Zero terminated information string. The information depends on statement type:

  • INSERT INTO...SELECT... β€” example result string: Records: 100 Duplicates: 0 Warnings: 0
  • INSERT INTO...VALUES (...),(...),(...) β€” example result string: Records: 3 Duplicates: 0 Warnings: 0
  • LOAD DATA INFILE β€” example result string: Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
  • ALTER TABLE ... β€” example result string: Records: 3 Duplicates: 0 Warnings: 0
  • UPDATE ... β€” example result string: Rows matched: 40 Changed: 40 Warnings: 0

🌈 SEE ALSO 🌈


Version 3.4, MariaDB Connector/C, mysql_info(3) β€” that's the whole page, bestie. Go be the main character of your database. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from