int mysql_get_optionv(MYSQL * mysql,
enum mysql_option,
void * arg,
...);
mysql_option
- the option you want to retrieve. See description below.
arg
- pointer to a variable for storing value of the specified option.
...
- variable argument list
Retrieves the value for a given option which was previously set by mysql_optionsv.
Returns zero on success, non zero if an error occurred (invalid option).
This function was added in MariaDB Connector/C 3.0.0.
MYSQL_REPORT_DATA_TRUNCATION
MYSQL_OPT_SSL_VERIFY_SERVER_CERT
MARIADB_OPT_CONNECTION_READ_ONLY
MYSQL_OPT_CONNECT_TIMEOUT
MARIADB_OPT_SSL_PASSPHRASE
MARIADB_OPT_CONNECTION_HANDLER
MYSQL_PROGRESS_CALLBACK: requires a function pointer *(const MYSQL *, uint, uint, double, const char *, uint))arg)
MYSQL_CONNECT_ATTRS: this option requires 5 parameters:
/* get number of connection attributes */
int i, elements= 0;
char **key, **value;
mysql_get_optionv(mysql, MYSQL_CONNECT_ATTRS, NULL, NULL, (void *)&elements);
key= (char **)malloc(sizeof(char *) * elements);
val= (char **)malloc(sizeof(char *) * elements);
mysql_get_optionv(mysql, MYSQL_OPT_CONNECT_ATTRS, &key, &val, &elements);
for (i=0; i < elements; i++)
printf("key: %s value: %s", key[i], val[i]);
MARIADB_OPT_USERDATA: retrieves userdata for a given key.
const char *ssh_user;
mysql_get_optionv(mysql, MARIADB_OPT_USERDATA, "ssh_user", (void *)ssh_user);
Last updated 2 months ago
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4