my_bool mysql_stmt_attr_set(MYSQL_STMT *stmt, enum
enum_stmt_attr_type option, const void *arg)
Description
Can be used to affect behavior for a prepared statement. In
MySQL 4.1, the option
argument can take the
single value STMT_ATTR_UPDATE_MAX_LENGTH
; the
arg
argument is a pointer of type
my_bool *
. If arg
points
to the value 1
, then the metadata
MYSQL_FIELD->max_length
in
mysql_stmt_store_result()
is
updated when the prepared statement is executed.
In MySQL 4.1,
mysql_stmt_attr_get()
uses
unsigned int *
, not my_bool
*
, for
STMT_ATTR_UPDATE_MAX_LENGTH
. This is
corrected in MySQL 5.1.7.
This function was added in MySQL 4.1.2. Additional options are planned for this function in later versions of MySQL.
Return Values
Zero if successful. Nonzero if option
is
unknown.
Errors
None.
User Comments
Add your own comment.