Version sans cache

Mise en cache désactivé. Réglage défaut pour cette page : actif (code DEF204)
Si l'affichage est trop lent, vous pouvez désactiver le mode utilisateur pour visualiser la version en cache.

Rechercher dans le manuel MySQL

28.7.7.30 mysql_get_option()

int mysql_get_option(MYSQL *mysql, enum mysql_option option, const void *arg)

Description

Returns the current value of an option settable using mysql_options(). The value should be treated as read only.

The option argument is the option for which you want its value. The arg argument is a pointer to a variable in which to store the option value. arg must be a pointer to a variable of the type appropriate for the option argument. The following table shows which variable type to use for each option value.

arg Type Applicable option Values
unsigned int MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_PROTOCOL, MYSQL_OPT_READ_TIMEOUT, MYSQL_OPT_RETRY_COUNT, MYSQL_OPT_SSL_FIPS_MODE, MYSQL_OPT_SSL_MODE, MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_ZSTD_COMPRESSION_LEVEL
unsigned long MYSQL_OPT_MAX_ALLOWED_PACKET, MYSQL_OPT_NET_BUFFER_LENGTH
bool MYSQL_ENABLE_CLEARTEXT_PLUGIN, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, MYSQL_OPT_GET_SERVER_PUBLIC_KEY, MYSQL_OPT_LOCAL_INFILE, MYSQL_OPT_OPTIONAL_RESULTSET_METADATA, MYSQL_OPT_RECONNECT, MYSQL_REPORT_DATA_TRUNCATION
const char * MYSQL_DEFAULT_AUTH, MYSQL_OPT_BIND, MYSQL_OPT_COMPRESSION_ALGORITHMS, MYSQL_OPT_SSL_CA, MYSQL_OPT_SSL_CAPATH, MYSQL_OPT_SSL_CERT, MYSQL_OPT_SSL_CIPHER, MYSQL_OPT_SSL_CRL, MYSQL_OPT_SSL_CRLPATH, MYSQL_OPT_SSL_KEY, MYSQL_OPT_TLS_CIPHERSUITES, MYSQL_OPT_TLS_VERSION, MYSQL_PLUGIN_DIR, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, MYSQL_SERVER_PUBLIC_KEY, MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_SHARED_MEMORY_BASE_NAME
argument not used MYSQL_OPT_COMPRESS
cannot be queried (error is returned) MYSQL_INIT_COMMAND, MYSQL_OPT_CONNECT_ATTR_DELETE, MYSQL_OPT_CONNECT_ATTR_RESET, MYSQL_OPT_NAMED_PIPE

Table des matières Haut

Return Values

Zero for success. Nonzero if an error occurred; this occurs for option values that cannot be queried.

The following call tests the MYSQL_OPT_RECONNECT option. After the call returns successfully, the value of reconnect is true or false to indicate whether automatic reconnection is enabled.

bool reconnect;

if (mysql_get_option(mysql, MYSQL_OPT_RECONNECT, &reconnect))
  fprintf(stderr, "mysql_get_options() failed\n");

Rechercher dans le manuel MySQL

Traduction non disponible

Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-mysql-get-option.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :en Manuel MySQL : https://dev.mysql.com/

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut