1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge branch '11.0' into 11.1

This commit is contained in:
Sergei Golubchik
2023-12-19 20:11:54 +01:00
672 changed files with 27790 additions and 5130 deletions

View File

@ -3206,6 +3206,17 @@ public:
*/
Query_arena *stmt_arena;
/**
Get either call or statement arena. In case some function is called from
within a query the call arena has to be used for a memory allocation,
else use the statement arena.
*/
Query_arena *active_stmt_arena_to_use()
{
return (state == Query_arena::STMT_SP_QUERY_ARGUMENTS) ? this :
stmt_arena;
}
void *bulk_param;
/*
@ -3437,7 +3448,11 @@ public:
{ return m_sent_row_count; }
ha_rows get_examined_row_count() const
{ return m_examined_row_count; }
{
DBUG_EXECUTE_IF("debug_huge_number_of_examined_rows",
return (ULONGLONG_MAX - 1000000););
return m_examined_row_count;
}
ulonglong get_affected_rows() const
{ return affected_rows; }
@ -4610,7 +4625,8 @@ public:
The worst things that can happen is that we get
a suboptimal error message.
*/
killed_err= (err_info*) alloc_root(&main_mem_root, sizeof(*killed_err));
if (!killed_err)
killed_err= (err_info*) my_malloc(PSI_INSTRUMENT_ME, sizeof(*killed_err), MYF(MY_WME));
if (likely(killed_err))
{
killed_err->no= killed_errno_arg;
@ -5041,13 +5057,24 @@ public:
public:
/** Overloaded to guard query/query_length fields */
virtual void set_statement(Statement *stmt);
void set_command(enum enum_server_command command)
inline void set_command(enum enum_server_command command)
{
DBUG_ASSERT(command != COM_SLEEP);
m_command= command;
#ifdef HAVE_PSI_THREAD_INTERFACE
PSI_STATEMENT_CALL(set_thread_command)(m_command);
#endif
}
/* As sleep needs a bit of special handling, we have a special case for it */
inline void mark_connection_idle()
{
proc_info= 0;
m_command= COM_SLEEP;
#ifdef HAVE_PSI_THREAD_INTERFACE
PSI_STATEMENT_CALL(set_thread_command)(m_command);
#endif
}
inline enum enum_server_command get_command() const
{ return m_command; }