mysql_sessi...ck_get_next(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_sessi...ck_get_next β€” bestie edition πŸ’–

okay so quick vibe check: this is a page from the MariaDB Connector/C manual, girlies. it's mysql_session_track_get_next(3) and it's giving "part two of a two-parter". let's get into it 🫢


✨ NAME ✨

mysql_session_track_get_next β€” retrieves the next session status change information πŸ’…


🌸 SYNOPSIS 🌸

#include <mysql.h>

int mysql_session_track_get_next(MYSQL * mysql,
                                 enum enum_session_state_type type,
                                 const char **data,
                                 size_t *length );

πŸ¦‹ DESCRIPTION πŸ¦‹

so mysql_session_track_get_next() pulls the session status change information that came back from the server β€” but only after you've already had a successful call to mysql_session_track_get_first(3). it's literally the sequel, no cap. πŸ“–βœ¨

and the way that you have to call mysql_session_track_get_next() repeatedly until you get a non-zero return value β€” that non-zero value is what tells you the data is done, periodt. πŸ”


πŸŽ€ PARAMETERS πŸŽ€

  • mysql β€” the mysql handle, bestie. you got this one earlier from mysql_init(3) and then connected it with mysql_real_connect(3). πŸ‘‘
  • type β€” the type of information. the valid values are literally:
    • SESSION_TRACK_SYSTEM_VARIABLES
    • SESSION_TRACK_SCHEMA
    • SESSION_TRACK_STATE_CHANGE
    • SESSION_TRACK_GTIDS (unsupported πŸ™ˆ)
  • data β€” a pointer to data, and it must be declared as const char *.
  • length β€” a pointer to a size_t variable, which is gonna end up holding the length of data. πŸ“

⭐ RETURN VALUE ⭐

Zero for success, nonzero if an error occurred. that's it, that's the whole thing. πŸ’€


🌈 HISTORY 🌈

mysql_session_track_get_next() was added in Connector/C 3.0 and MariaDB Server 10.2. old but iconic, iykyk. 🧚


πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, bestie β€” Version 3.4, MariaDB Connector/C, slay πŸ’…βœ¨

πŸ“¦ where this page comes from