For the complete documentation index, see llms.txt. This page is also available as Markdown.

mysql_stmt_send_long_data

mysql_stmt_send_long_data sends a parameter value in chunks to the server, enabling large TEXT or BLOB data that exceeds max_allowed_packet to be streamed in multiple calls.

Syntax

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

Parameter

  • stmt - a statement handle, which was previously allocated by mysql_stmt_init().

  • param_no - indicates which parameter to associate the data with. Parameters are numbered beginning with 0.

  • data - a buffer containing the data to send.

  • length - size, in bytes, of the data buffer.

Description

Allows sending parameter data to the server in pieces (or chunks), e.g. if the size of a blob exceeds the size of max_allowed_packet. This function can be called multiple times to send the parts of a character or binary data value for a column, which must be one of the TEXT or BLOB datatypes.

Return Value

Returns zero on success, nonzero if an error occurred.

See Also

spinner

Last updated

Was this helpful?