You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In particular, an AbstractString value can now be used as
- a connection parameter or an option value;
- a SQL statement;
- an input parameter;
- a string literal to escape.
Connect to a MySQL database with provided `host`, `user`, and `passwd` positional arguments. Supported keyword arguments include:
245
-
* `db::String=""`: attach to a database by default
245
+
* `db::AbstractString=""`: attach to a database by default
246
246
* `port::Integer=3306`: connect to the database on a specific port
247
-
* `unix_socket::String`: specifies the socket or named pipe that should be used
247
+
* `unix_socket::AbstractString`: specifies the socket or named pipe that should be used
248
248
* `found_rows::Bool=false`: Return the number of matched rows instead of number of changed rows
249
249
* `no_schema::Bool=false`: Forbids the use of database.tablename.column syntax and forces the SQL parser to generate an error.
250
250
* `compress::Bool=false`: Use compression protocol
@@ -258,34 +258,34 @@ Connect to a MySQL database with provided `host`, `user`, and `passwd` positiona
258
258
* `read_timeout::Integer`: Specifies the timeout in seconds for reading packets from the server.
259
259
* `write_timeout::Integer`: Specifies the timeout in seconds for reading packets from the server.
260
260
* `data_truncation::Bool`: Enable or disable reporting data truncation errors for prepared statements
261
-
* `charset_dir::String`: character set files directory
262
-
* `charset_name::String`: Specify the default character set for the connection
263
-
* `bind::String`: Specify the network interface from which to connect to the database, like `"192.168.8.3"`
261
+
* `charset_dir::AbstractString`: character set files directory
262
+
* `charset_name::AbstractString`: Specify the default character set for the connection
263
+
* `bind::AbstractString`: Specify the network interface from which to connect to the database, like `"192.168.8.3"`
264
264
* `max_allowed_packet::Integer`: The maximum packet length to send to or receive from server. The default is 16MB, the maximum 1GB.
265
265
* `net_buffer_length::Integer`: The buffer size for TCP/IP and socket communication. Default is 16KB.
266
266
* `named_pipe::Bool`: For Windows operating systems only: Use named pipes for client/server communication.
267
267
* `protocol::MySQL.API.mysql_protocol_type`: Specify the type of client/server protocol. Possible values are: `MySQL.API.MYSQL_PROTOCOL_TCP`, `MySQL.API.MYSQL_PROTOCOL_SOCKET`, `MySQL.API.MYSQL_PROTOCOL_PIPE`, `MySQL.API.MYSQL_PROTOCOL_MEMORY`.
268
-
* `ssl_key::String`: Defines a path to a private key file to use for TLS. This option requires that you use the absolute path, not a relative path. If the key is protected with a passphrase, the passphrase needs to be specified with `passphrase` keyword argument.
269
-
* `passphrase::String`: Specify a passphrase for a passphrase-protected private key, as configured by the `ssl_key` keyword argument.
270
-
* `ssl_cert::String`: Defines a path to the X509 certificate file to use for TLS. This option requires that you use the absolute path, not a relative path.
271
-
* `ssl_ca::String`: Defines a path to a PEM file that should contain one or more X509 certificates for trusted Certificate Authorities (CAs) to use for TLS. This option requires that you use the absolute path, not a relative path.
272
-
* `ssl_capath::String`: Defines a path to a directory that contains one or more PEM files that should each contain one X509 certificate for a trusted Certificate Authority (CA) to use for TLS. This option requires that you use the absolute path, not a relative path. The directory specified by this option needs to be run through the openssl rehash command.
273
-
* `ssl_cipher::String`: Defines a list of permitted ciphers or cipher suites to use for TLS, like `"DHE-RSA-AES256-SHA"`
274
-
* `ssl_crl::String`: Defines a path to a PEM file that should contain one or more revoked X509 certificates to use for TLS. This option requires that you use the absolute path, not a relative path.
275
-
* `ssl_crlpath::String`: Defines a path to a directory that contains one or more PEM files that should each contain one revoked X509 certificate to use for TLS. This option requires that you use the absolute path, not a relative path. The directory specified by this option needs to be run through the openssl rehash command.
268
+
* `ssl_key::AbstractString`: Defines a path to a private key file to use for TLS. This option requires that you use the absolute path, not a relative path. If the key is protected with a passphrase, the passphrase needs to be specified with `passphrase` keyword argument.
269
+
* `passphrase::AbstractString`: Specify a passphrase for a passphrase-protected private key, as configured by the `ssl_key` keyword argument.
270
+
* `ssl_cert::AbstractString`: Defines a path to the X509 certificate file to use for TLS. This option requires that you use the absolute path, not a relative path.
271
+
* `ssl_ca::AbstractString`: Defines a path to a PEM file that should contain one or more X509 certificates for trusted Certificate Authorities (CAs) to use for TLS. This option requires that you use the absolute path, not a relative path.
272
+
* `ssl_capath::AbstractString`: Defines a path to a directory that contains one or more PEM files that should each contain one X509 certificate for a trusted Certificate Authority (CA) to use for TLS. This option requires that you use the absolute path, not a relative path. The directory specified by this option needs to be run through the openssl rehash command.
273
+
* `ssl_cipher::AbstractString`: Defines a list of permitted ciphers or cipher suites to use for TLS, like `"DHE-RSA-AES256-SHA"`
274
+
* `ssl_crl::AbstractString`: Defines a path to a PEM file that should contain one or more revoked X509 certificates to use for TLS. This option requires that you use the absolute path, not a relative path.
275
+
* `ssl_crlpath::AbstractString`: Defines a path to a directory that contains one or more PEM files that should each contain one revoked X509 certificate to use for TLS. This option requires that you use the absolute path, not a relative path. The directory specified by this option needs to be run through the openssl rehash command.
276
276
* `ssl_verify_server_cert::Bool`: Enables (or disables) server certificate verification.
277
277
* `ssl_enforce::Bool`: Whether to force TLS
278
-
* `default_auth::String`: Default authentication client-side plugin to use.
279
-
* `connection_handler::String`: Specify the name of a connection handler plugin.
280
-
* `plugin_dir::String`: Specify the location of client plugins. The plugin directory can also be specified with the MARIADB_PLUGIN_DIR environment variable.
278
+
* `default_auth::AbstractString`: Default authentication client-side plugin to use.
279
+
* `connection_handler::AbstractString`: Specify the name of a connection handler plugin.
280
+
* `plugin_dir::AbstractString`: Specify the location of client plugins. The plugin directory can also be specified with the MARIADB_PLUGIN_DIR environment variable.
281
281
* `secure_auth::Bool`: Refuse to connect to the server if the server uses the mysql_old_password authentication plugin. This mode is off by default, which is a difference in behavior compared to MySQL 5.6 and later, where it is on by default.
282
-
* `server_public_key::String`: Specifies the name of the file which contains the RSA public key of the database server. The format of this file must be in PEM format. This option is used by the caching_sha2_password client authentication plugin.
282
+
* `server_public_key::AbstractString`: Specifies the name of the file which contains the RSA public key of the database server. The format of this file must be in PEM format. This option is used by the caching_sha2_password client authentication plugin.
283
283
* `read_default_file::Bool`: only the default option files are read
284
-
* `option_file::String`: the argument is interpreted as a path to a custom option file, and only that option file is read.
284
+
* `option_file::AbstractString`: the argument is interpreted as a path to a custom option file, and only that option file is read.
285
285
* `read_default_group::Bool`: only the default option groups are read from specified option file(s)
286
-
* `option_group::String`: it is interpreted as a custom option group, and that custom option group is read in addition to the default option groups.
286
+
* `option_group::AbstractString`: it is interpreted as a custom option group, and that custom option group is read in addition to the default option groups.
return@checknull mysql mysql_client_find_plugin(mysql.ptr, name, type)
142
142
end
143
143
@@ -1034,7 +1034,7 @@ value: A pointer to the option value.
1034
1034
Return Values
1035
1035
Zero for success, 1 if an error occurred. If the plugin has an option handler, that handler should also return zero for success and 1 if an error occurred.
@@ -1129,7 +1129,7 @@ If no value is found in an option file for a parameter, its default value is use
1129
1129
Return Values
1130
1130
A MYSQL* connection handler if the connection was successful, NULL if the connection was unsuccessful. For a successful connection, the return value is the same as the value of the first parameter.
@@ -1145,7 +1145,7 @@ The string pointed to by from must be length bytes long. You must allocate the t
1145
1145
1146
1146
If you must change the character set of the connection, use the mysql_set_character_set() function rather than executing a SET NAMES (or SET CHARACTER SET) statement. mysql_set_character_set() works like SET NAMES but also affects the character set used by mysql_real_escape_string(), which SET NAMES does not.
tolen =mysql_real_escape_string(mysql.ptr, to, str, len)
@@ -1198,7 +1198,7 @@ if (mysql_real_query(&mysql,query,(unsigned int) (end - query)))
1198
1198
}
1199
1199
The my_stpcpy() function used in the example is included in the libmysqlclient library and works like strcpy() but returns a pointer to the terminating null of the first parameter.
return@checksuccess mysql mysql_select_db(mysql.ptr, db)
1326
1326
end
1327
1327
1328
1328
#="""
1329
1329
This function is used to set the default character set for the current connection. The string csname specifies a valid character set name. The connection collation becomes the default collation of the character set. This function works like the SET NAMES statement, but also sets the value of mysql->charset, and thus affects the character set used by mysql_real_escape_string()
0 commit comments