int mysql_options(MYSQL * mysql,
                  enum mysql_option,
                  const void * arg);
  • mysql - a mysql handle, which was previously allocated by mysql_init() or mysql_real_connect().
  • mysql_option - the option you want to set. See description below.
  • arg - the value for the option.


Used to set extra connect options and affect behavior for a connection. This function may be called multiple times to set several options. mysql_options() should be called after mysql_init() and before mysql_real_connect().

Returns zero on success, non zero if an error occurred (invalid option or value).

This function is deprecated as of MariaDB Connector/C 3.0 and will be removed in future releases. It's preferable to use mysql_optionsv.


See mysql_optionsv.

See also


Comments loading...