mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Added client functions:
- mysql_get_server_name() This returns MySQL or MariaDB depending on the server type - mariadb_connection() This returns 1 if you are connected to a MariaDB server Modifed the MySQL command line client to print out if you are connected to MariaDB or MySQL Better default prompt (shows server you are connected to and base directory) client/mysql.cc: Print out if you are connected to MariaDB or MySQL Better default prompt (shows server you are connected to and base directory) Added option \N to prompt to print server name. configure.in: Changed maria to MariaDB in version string include/mysql.h: Added mysql_get_server_name() and mariadb_connection() include/mysql.h.pp: Update for new API functions libmysql/libmysql.c: Added client functions: - mysql_get_server_name() This returns MySQL or MariaDB depending on the server type - mariadb_connection() This returns 1 if you are connected to a MariaDB server
This commit is contained in:
@ -1430,6 +1430,18 @@ mysql_get_server_info(MYSQL *mysql)
|
||||
}
|
||||
|
||||
|
||||
my_bool STDCALL mariadb_connection(MYSQL *mysql)
|
||||
{
|
||||
return strinstr(mysql->server_version, "MariaDB") != 0;
|
||||
}
|
||||
|
||||
const char * STDCALL
|
||||
mysql_get_server_name(MYSQL *mysql)
|
||||
{
|
||||
return mariadb_connection(mysql) ? "MariaDB" : "MySQL";
|
||||
}
|
||||
|
||||
|
||||
const char * STDCALL
|
||||
mysql_get_host_info(MYSQL *mysql)
|
||||
{
|
||||
|
Reference in New Issue
Block a user