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

Merge branch '10.6' into 10.11

This commit is contained in:
Sergei Golubchik
2023-12-17 16:56:38 +01:00
629 changed files with 27336 additions and 4573 deletions

View File

@@ -3205,6 +3205,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;
/*
@@ -3436,7 +3447,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; }
@@ -4609,7 +4624,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;
@@ -5040,13 +5056,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; }