mysql_stmt_send_long_data(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_stmt_send_long_data πŸ’–

okay bestie, so this is a page from the MariaDB Connector/C manual set, and it's literally about yeeting your data at the server in lil bite-sized pieces instead of one giant blob. iconic behavior, tbh.


✨ Name ✨

mysql_stmt_send_long_data β€” sends data in chunks πŸ“


✨ Synopsis ✨

#include <mysql.h>

my_bool mysql_stmt_send_long_data(MYSQL_STMT * stmt,
                                  unsigned int,
                                  const char * data,
                                  unsigned long);

✨ Description ✨

This function lets you send parameter data to the server in pieces (we call 'em chunks, bestie, it's giving charcuterie board πŸ§€). Why would you ever do that? Well, say the size of a blob is bigger than the size of max_allowed_packet β€” yeah, that's the moment. πŸ’…

You can call this function multiple times to send the parts of a character or binary data value for a column, and that column has to be one of the TEXT or BLOB datatypes. no cap.


✨ Parameter ✨

  • stmt β€” a statement handle, which was previously allocated by mysql_stmt_init(3). πŸŽ€
  • param_no β€” indicates which parameter to associate the data with. Parameters are numbered beginning with 0. (yes bestie, zero-indexed, we live in a society πŸ™ˆ)
  • data β€” a buffer containing the data to send. 🌸
  • long β€” size of the data buffer.

✨ Return value ✨

Returns zero on success, nonzero if an error occurred. that's it, that's the vibe check 😭


✨ Notes ✨

  • mysql_stmt_send_long_data() must be called before mysql_stmt_execute(3). like, before. do not skip ahead, bestie, it will not go well πŸ’€
  • bound variables for this column will be ignored when calling mysql_stmt_execute(3). yeah, they just get ghosted πŸ‘»

✨ See also ✨


and that's the whole page, bestie!! this was Version 3.4 of the MariaDB Connector/C docs β€” tysm for reading, mwah, slay, periodt πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from