1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

Merge 10.11 into 11.0

This commit is contained in:
Marko Mäkelä
2024-03-28 10:51:36 +02:00
490 changed files with 14843 additions and 4704 deletions

View File

@@ -1573,6 +1573,8 @@ public:
*/
bool check_access(const privilege_t want_access, bool match_any = false);
bool is_priv_user(const char *user, const char *host);
bool is_user_defined() const
{ return user && user != delayed_user && user != slave_user; };
};
@@ -5187,11 +5189,29 @@ public:
{
if (global_system_variables.log_warnings > threshold)
{
char real_ip_str[64];
real_ip_str[0]= 0;
/* For proxied connections, add the real IP to the warning message */
if (net.using_proxy_protocol && net.vio)
{
if(net.vio->localhost)
snprintf(real_ip_str, sizeof(real_ip_str), " real ip: 'localhost'");
else
{
char buf[INET6_ADDRSTRLEN];
if (!vio_getnameinfo((sockaddr *)&(net.vio->remote), buf,
sizeof(buf),NULL, 0, NI_NUMERICHOST))
{
snprintf(real_ip_str, sizeof(real_ip_str), " real ip: '%s'",buf);
}
}
}
Security_context *sctx= &main_security_ctx;
sql_print_warning(ER_THD(this, ER_NEW_ABORTING_CONNECTION),
thread_id, (db.str ? db.str : "unconnected"),
sctx->user ? sctx->user : "unauthenticated",
sctx->host_or_ip, reason);
sctx->host_or_ip, real_ip_str, reason);
}
}
@@ -5289,8 +5309,18 @@ public:
Flag, mutex and condition for a thread to wait for a signal from another
thread.
Currently used to wait for group commit to complete, can also be used for
other purposes.
Currently used to wait for group commit to complete, and COND_wakeup_ready
is used for threads to wait on semi-sync ACKs (though is protected by
Repl_semi_sync_master::LOCK_binlog). Note the following relationships
between these two use-cases when using
rpl_semi_sync_master_wait_point=AFTER_SYNC during group commit:
1) Non-leader threads use COND_wakeup_ready to wait for the leader thread
to complete binlog commit.
2) The leader thread uses COND_wakeup_ready to await ACKs from the
replica before signalling the non-leader threads to wake up.
With wait_point=AFTER_COMMIT, there is no overlap as binlogging has
finished, so COND_wakeup_ready is safe to re-use.
*/
bool wakeup_ready;
mysql_mutex_t LOCK_wakeup_ready;
@@ -5418,14 +5448,6 @@ public:
bool is_binlog_dump_thread();
#endif
/*
Indicates if this thread is suspended due to awaiting an ACK from a
replica. True if suspended, false otherwise.
Note that this variable is protected by Repl_semi_sync_master::LOCK_binlog
*/
bool is_awaiting_semisync_ack;
inline ulong wsrep_binlog_format(ulong binlog_format) const
{
#ifdef WITH_WSREP