Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libmariadb/mariadb_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,7 @@ ma_set_connect_attrs(MYSQL *mysql)
rc= mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_client_name") +
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_client_version") +
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_os") +
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_host_name") +
#ifdef _WIN32
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_thread") +
#endif
Expand All @@ -1104,7 +1105,8 @@ ma_set_connect_attrs(MYSQL *mysql)

rc+= mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_client_name", "libmariadb")
+ mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_client_version", MARIADB_PACKAGE_VERSION)
+ mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_os", MARIADB_SYSTEM_TYPE);
+ mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_os", MARIADB_SYSTEM_TYPE)
+ mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_host_name", mysql->host);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connection attributes are client attributes. Why do you need to send the server name to the server (mysql->host) ?


#ifdef _WIN32
snprintf(buffer, 255, "%lu", (ulong) GetCurrentThreadId());
Expand Down