summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/CMakeLists.txt1
-rw-r--r--libmysql/libmysql.c15
-rw-r--r--libmysql/libmysql.def1
3 files changed, 16 insertions, 1 deletions
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
index d0e383c6640..816977d9b8e 100644
--- a/libmysql/CMakeLists.txt
+++ b/libmysql/CMakeLists.txt
@@ -148,6 +148,7 @@ SET(CLIENT_SOURCES
../sql-common/my_time.c
../sql-common/client_plugin.c
../sql/net_serv.cc
+ ../sql-common/client_plugin.c
../sql-common/pack.c
../sql/password.c
)
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index ec48720a2f5..1af15c75d7f 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -980,6 +980,19 @@ mysql_get_server_info(MYSQL *mysql)
}
+my_bool STDCALL mariadb_connection(MYSQL *mysql)
+{
+ return (strstr(mysql->server_version, "MariaDB") ||
+ strstr(mysql->server_version, "-maria-"));
+}
+
+const char * STDCALL
+mysql_get_server_name(MYSQL *mysql)
+{
+ return mariadb_connection(mysql) ? "MariaDB" : "MySQL";
+}
+
+
const char * STDCALL
mysql_get_host_info(MYSQL *mysql)
{
@@ -4218,7 +4231,7 @@ int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *my_bind,
if ((int) stmt->state < (int) MYSQL_STMT_FETCH_DONE)
{
set_stmt_error(stmt, CR_NO_DATA, unknown_sqlstate, NULL);
- return 1;
+ DBUG_RETURN(1);
}
if (column >= stmt->field_count)
{
diff --git a/libmysql/libmysql.def b/libmysql/libmysql.def
index ce85d2a4086..5a6bee4919f 100644
--- a/libmysql/libmysql.def
+++ b/libmysql/libmysql.def
@@ -104,3 +104,4 @@ EXPORTS
mysql_server_end
mysql_set_character_set
mysql_get_character_set_info
+ mysql_get_server_name