stmt - a statement handle, which was previously allocated by mysql_stmt_init().
enum_stmt_attr_type - attribute. See below.
attr - pointer to a variable, which will contain the attribute value.
Gets the current value of a statement attribute. Returns zero on success, non zero on failure.
The enum_stmt_attr_type parameter has the following possible values:
STMT_ATTR_UPDATE_MAX_LENGTH: Indicates if will update the max_length value of MYSQL_FIELD structures.
STMT_ATTR_CURSOR_TYPE: Cursor type. Possible values are CURSOR_TYPE_READ_ONLY or default value CURSOR_TYPE_NO_CURSOR.
STMT_ATTR_PREFETCH_ROWS
my_bool mysql_stmt_attr_get(MYSQL_STMT * stmt,
enum enum_stmt_attr_type,
void * attr);STMT_ATTR_PREBIND_PARAMS: Number of parameters used for mariadb_stmt_execute_direct()
unsigned int param_count;
rc= mysql_stmt_attr_get(stmt, STMT_ATTR_PREBIND_PARAMS, ¶m_count);my_bool is_update;
rc= mysql_stmt_attr_get(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &is_update);unsigned long cursor_type;
rc= mysql_stmt_attr_get(stmt, STMT_ATTR_CURSOR_TYPE, &cursor_type);unsigned long prefetch_rows;
rc= mysql_stmt_attr_get(stmt, STMT_ATTR_PREFETCH_ROWS, &prefetch_rows);