int mysql_stmt_store_result(MYSQL_STMT *stmt)
Result sets are produced by calling
mysql_stmt_execute() to executed
prepared statements for SQL statements such as
EXPLAIN. By default, result sets
for successfully executed prepared statements are not buffered
on the client and
mysql_stmt_fetch() fetches them
one at a time from the server. To cause the complete result set
to be buffered on the client, call
binding data buffers with
mysql_stmt_fetch() to fetch
rows. (For an example, see Section 18.104.22.168, “mysql_stmt_fetch()”.)
optional for result set processing, unless you will call
functions require a seekable result set.
It is unnecessary to call
executing an SQL statement that does not produce a result set,
but if you do, it does not harm or cause any notable performance
problem. You can detect whether the statement produced a result
set by checking if
NULL. For more information, refer to
Section 22.214.171.124, “mysql_stmt_result_metadata()”.
MySQL does not by default calculate
MYSQL_FIELD->max_length for all columns
because calculating this would slow down
considerably and most applications do not need
max_length. If you want
max_length to be updated, you can call
STMT_ATTR_UPDATE_MAX_LENGTH, &flag) to enable
this. See Section 126.96.36.199, “mysql_stmt_attr_set()”.
Zero for success. Nonzero if an error occurred.
If the application is linked to the embedded server library,
runtime error messages will indicate the
libmysqld rather than
libmysqlclient library, but the solution to
the problem is the same as just described.