-
Notifications
You must be signed in to change notification settings - Fork 267
libmysql_libmariadb
Even if MariaDB Connector/C and MySQL Connector/C have common roots (namely the version 3.23.51 from the year 2003 which was published under the LGPL), both have some differences.
While MySQL Connector/C (or libmysql) was further developed under the GPL, MariaDB Connector/C was newly developed based on MySQL 3.23.51. Major enhancements, such as the prepared statement API and numerous protocol extensions have been integrated from mysqlnd extension of the PHP project. The first version of MariaDB Connector/C was released in 2012.
In contrast to MySQL Connector/C, MariaDB Connector/C is licensed under the LGPL license and thus can be integrated and used free of charge in almost all (including commercial/closed source) projects.
API functions which are supported by both MySQL and MariaDB Connector/C are prefixed with "mysql", MariaDB specific features are prefixed with "mariadb".
Example:
mysql_real_connect
mariadb_stmt_execute_direct
No rule without exception: For example, the mysql_optionsv function only exists in MariaDB Connector / C. It was added as an extension of the existing mysql_options function to allow a function call with a variable number of parameters.
mysql_reset_server_public_key
-
mysql_result_metadata
(scheduled for MariaDB C/C 3.1) -
mysql_binlog_*
(The binlog replication API in MariaDB C/C 3.1 has a different interface)
mariadb_connection
mysql_optionsv
mysql_get_info
mariadb_reconnect
mariadb_cancel
mariadb_stmt_execute_direct
mysql_stmt_warning_count
mysql_get_timeout_value/ms
-
mariadb_dyncol-*
(dynamic column api) -
mysql_async_*
(asynchronous/non-blocking API) -
mariadb_rpl_*
(replication/binlog API)
Especially in the last versions (MySQL C/C> = 5.7 and MariaDB C/C> = 3.0) some protocol extensions were added which are not or only partially supported:
Protocol | MySQL C/C | MariaDB C/C |
---|---|---|
X-Protocol | X | - |
Extended OK packet | X | - (scheduled for 3.1) |
Prepared statement bulk insert | - | X |
Prepared statemnt direct execution | - | X |
Both MySQL and MariaDB Connector/C support different kind of plugable client authentication plugins:
Authentication plugin | MySQL C/C | MariaDB C/C |
---|---|---|
Native password | X | X |
Old password | X (removed in newer versions) | X |
Cleartext | X | X |
Dialog | X | X |
SHA256 | X | X¹ |
Caching SHA2 | X | X¹ |
Kerberos/GSSAPI | - | X |
ed25519 | - | X |
¹= requires OpenSSL, LibreSSL or GnuTLS
Both MySQL and MariaDB Connector/C support secure connection using the TLS protocol, however with some differences:
TLS library | MySQL C/C | MariaDB C/C |
---|---|---|
OpenSSL | X | X |
LibreSSL | X | X |
GnuTLS | - | X |
Windows Schannel | - | X |
WolfSSL | X | -² |
Yassl | X | -² |
²= license incompatible
Protocol version | MySQL C/C | MariaDB C/C |
---|---|---|
SSLv3 | x (yassl only) | - |
TLSv1.0 | X | X |
TLSv1.1 | X | X |
TLSv1.2 | X (not yassl) | X |
TLSv1.3 | X (not yassl) | X |
Feature | MySQL C/C | MariaDB C/C |
---|---|---|
ssl mode | X | - |
server certificate verification | X | X |
passphrase protected keys | - | X |
force use of tls version | - | X |
certificate finger print verification | - | X |
MariaDB Connector/C Reference