1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '10.5' into 10.6

This commit is contained in:
Sergei Golubchik
2022-05-10 11:53:59 +02:00
249 changed files with 7080 additions and 1864 deletions

View File

@@ -16,7 +16,7 @@
#define PLUGIN_VERSION 0x104
#define PLUGIN_STR_VERSION "1.4.13"
#define PLUGIN_STR_VERSION "1.4.14"
#define _my_thread_var loc_thread_var
@@ -954,7 +954,19 @@ static unsigned long long query_counter= 1;
static struct connection_info *get_loc_info(MYSQL_THD thd)
{
/*
This is the original code and supposed to be returned
bach to this as the MENT-1438 is finally understood/resolved.
return (struct connection_info *) THDVAR(thd, loc_info);
*/
struct connection_info *ci= (struct connection_info *) THDVAR(thd, loc_info);
if ((size_t) ci->user_length > sizeof(ci->user))
{
ci->user_length= 0;
ci->host_length= 0;
ci->ip_length= 0;
}
return ci;
}
@@ -1391,6 +1403,16 @@ static size_t log_header(char *message, size_t message_len,
host= userip;
}
/*
That was added to find the possible cause of the MENT-1438.
Supposed to be removed after that.
*/
if (username_len > 1024)
{
username= "unknown_user";
username_len= (unsigned int) strlen(username);
}
if (output_type == OUTPUT_SYSLOG)
return my_snprintf(message, message_len,
"%.*s,%.*s,%.*s,%d,%lld,%s",