For the complete documentation index, see llms.txt. This page is also available as Markdown.

mysql_options

mysql_options sets extra connection options on a MYSQL handle before calling mysql_real_connect. Deprecated since Connector/C 3.0 — use mysql_optionsv instead.

Syntax

int mysql_options(MYSQL * mysql,
                  enum mysql_option,
                  const void * arg);

Parameters

  • 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.

Description

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().

Return Value

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

Options

See mysql_optionsv.

See Also

spinner

Last updated

Was this helpful?