mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.5' into 10.6
This commit is contained in:
@ -2334,14 +2334,14 @@ struct wait_for_commit
|
||||
bool commit_started;
|
||||
|
||||
void register_wait_for_prior_commit(wait_for_commit *waitee);
|
||||
int wait_for_prior_commit(THD *thd)
|
||||
int wait_for_prior_commit(THD *thd, bool allow_kill=true)
|
||||
{
|
||||
/*
|
||||
Quick inline check, to avoid function call and locking in the common case
|
||||
where no wakeup is registered, or a registered wait was already signalled.
|
||||
*/
|
||||
if (waitee.load(std::memory_order_acquire))
|
||||
return wait_for_prior_commit2(thd);
|
||||
return wait_for_prior_commit2(thd, allow_kill);
|
||||
else
|
||||
{
|
||||
if (wakeup_error)
|
||||
@ -2395,7 +2395,7 @@ struct wait_for_commit
|
||||
|
||||
void wakeup(int wakeup_error);
|
||||
|
||||
int wait_for_prior_commit2(THD *thd);
|
||||
int wait_for_prior_commit2(THD *thd, bool allow_kill);
|
||||
void wakeup_subsequent_commits2(int wakeup_error);
|
||||
void unregister_wait_for_prior_commit2();
|
||||
|
||||
@ -3042,6 +3042,16 @@ public:
|
||||
return m_binlog_filter_state;
|
||||
}
|
||||
|
||||
/**
|
||||
Checks if a user connection is read-only
|
||||
*/
|
||||
inline bool is_read_only_ctx()
|
||||
{
|
||||
return opt_readonly &&
|
||||
!(security_ctx->master_access & PRIV_IGNORE_READ_ONLY) &&
|
||||
!slave_thread;
|
||||
}
|
||||
|
||||
private:
|
||||
/**
|
||||
Indicate if the current statement should be discarded
|
||||
@ -4158,6 +4168,10 @@ public:
|
||||
{
|
||||
return strmake_lex_cstring(from.str, from.length);
|
||||
}
|
||||
LEX_CSTRING strmake_lex_cstring_trim_whitespace(const LEX_CSTRING &from)
|
||||
{
|
||||
return strmake_lex_cstring(Lex_cstring(from).trim_whitespace(charset()));
|
||||
}
|
||||
|
||||
LEX_STRING *make_lex_string(LEX_STRING *lex_str, const char* str, size_t length)
|
||||
{
|
||||
@ -5140,10 +5154,10 @@ public:
|
||||
}
|
||||
|
||||
wait_for_commit *wait_for_commit_ptr;
|
||||
int wait_for_prior_commit()
|
||||
int wait_for_prior_commit(bool allow_kill=true)
|
||||
{
|
||||
if (wait_for_commit_ptr)
|
||||
return wait_for_commit_ptr->wait_for_prior_commit(this);
|
||||
return wait_for_commit_ptr->wait_for_prior_commit(this, allow_kill);
|
||||
return 0;
|
||||
}
|
||||
void wakeup_subsequent_commits(int wakeup_error)
|
||||
|
Reference in New Issue
Block a user