Rechercher dans le manuel MySQL
28. 7. 7. 74 mysql _set _server _option ()
int mysql_set_server_option(MYSQL *mysql, enum
enum_mysql_set_option option)
Description
Enables or disables an option for the connection.
option
can have one of the following
values.
Option | Description |
---|---|
MYSQL_OPTION_MULTI_STATEMENTS_ON |
Enable multiple-statement support |
MYSQL_OPTION_MULTI_STATEMENTS_OFF |
Disable multiple-statement support |
If you enable multiple-statement support, you should retrieve
results from calls to
mysql_query()
or
mysql_real_query()
by using a
loop that calls
mysql_next_result()
to
determine whether there are more results. For an example, see
Section 28.7.23, “C API Multiple Statement Execution Support”.
Enabling multiple-statement support with
MYSQL_OPTION_MULTI_STATEMENTS_ON
does not
have quite the same effect as enabling it by passing the
CLIENT_MULTI_STATEMENTS
flag to
mysql_real_connect()
:
CLIENT_MULTI_STATEMENTS
also enables
CLIENT_MULTI_RESULTS
. If you are using the
CALL
SQL statement in your
programs, multiple-result support must be enabled; this means
that MYSQL_OPTION_MULTI_STATEMENTS_ON
by
itself is insufficient to permit the use of
CALL
.
Commands were executed in an improper order.
The MySQL server has gone away.
The connection to the server was lost during the query.
The server did not support
mysql_set_server_option()
(which is the case that the server is older than 4.1.1) or the server did not support the option one tried to set.
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-mysql-set-server-option.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.