1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge 10.5 into 10.6

This commit is contained in:
Marko Mäkelä
2025-01-20 09:57:37 +02:00
142 changed files with 3642 additions and 828 deletions

View File

@ -50,6 +50,7 @@
#include "session_tracker.h"
#include "backup.h"
#include "xa.h"
#include "scope.h"
#include "ddl_log.h" /* DDL_LOG_STATE */
#include "ha_handler_stats.h" // ha_handler_stats */
@ -5965,7 +5966,8 @@ public:
*/
virtual int send_data(List<Item> &items)=0;
virtual ~select_result_sink() = default;
void reset(THD *thd_arg) { thd= thd_arg; }
// Used in cursors to initialize and reset
void reinit(THD *thd_arg) { thd= thd_arg; }
};
class select_result_interceptor;
@ -6039,15 +6041,11 @@ public:
*/
virtual bool check_simple_select() const;
virtual void abort_result_set() {}
/*
Cleanup instance of this class for next execution of a prepared
statement/stored procedure.
*/
virtual void cleanup();
virtual void reset_for_next_ps_execution();
void set_thd(THD *thd_arg) { thd= thd_arg; }
void reset(THD *thd_arg)
void reinit(THD *thd_arg)
{
select_result_sink::reset(thd_arg);
select_result_sink::reinit(thd_arg);
unit= NULL;
}
#ifdef EMBEDDED_LIBRARY
@ -6153,9 +6151,9 @@ public:
elsewhere. (this is used by ANALYZE $stmt feature).
*/
void disable_my_ok_calls() { suppress_my_ok= true; }
void reset(THD *thd_arg)
void reinit(THD *thd_arg)
{
select_result::reset(thd_arg);
select_result::reinit(thd_arg);
suppress_my_ok= false;
}
protected:
@ -6207,7 +6205,7 @@ private:
{}
void reset(THD *thd_arg)
{
select_result_interceptor::reset(thd_arg);
select_result_interceptor::reinit(thd_arg);
spvar_list= NULL;
field_count= 0;
}
@ -6251,7 +6249,7 @@ public:
void reset(THD *thd_arg, sp_lex_keeper *lex_keeper)
{
sp_cursor_statistics::reset();
result.reset(thd_arg);
result.reinit(thd_arg);
m_lex_keeper= lex_keeper;
server_side_cursor= NULL;
}
@ -6279,7 +6277,7 @@ public:
bool send_eof() override;
bool check_simple_select() const override { return FALSE; }
void abort_result_set() override;
void cleanup() override;
void reset_for_next_ps_execution() override;
select_result_interceptor *result_interceptor() override { return NULL; }
};
@ -6314,7 +6312,9 @@ public:
{ path[0]=0; }
~select_to_file();
bool send_eof() override;
void cleanup() override;
void abort_result_set() override;
void reset_for_next_ps_execution() override;
bool free_recources();
};
@ -6391,7 +6391,7 @@ class select_insert :public select_result_interceptor {
bool send_eof() override;
void abort_result_set() override;
/* not implemented: select_insert is never re-used in prepared statements */
void cleanup() override;
void reset_for_next_ps_execution() override;
};
@ -6618,7 +6618,7 @@ public:
int delete_record();
bool send_eof() override;
virtual bool flush();
void cleanup() override;
void reset_for_next_ps_execution() override;
virtual bool create_result_table(THD *thd, List<Item> *column_types,
bool is_distinct, ulonglong options,
const LEX_CSTRING *alias,
@ -6793,9 +6793,10 @@ class select_union_recursive :public select_unit
*/
List<TABLE_LIST> rec_table_refs;
/*
The count of how many times cleanup() was called with cleaned==false
for the unit specifying the recursive CTE for which this object was created
or for the unit specifying a CTE that mutually recursive with this CTE.
The count of how many times reset_for_next_ps_execution() was called with
cleaned==false for the unit specifying the recursive CTE for which this
object was created or for the unit specifying a CTE that mutually
recursive with this CTE.
*/
uint cleanup_count;
long row_counter;
@ -6814,7 +6815,7 @@ class select_union_recursive :public select_unit
bool create_table,
bool keep_row_order,
uint hidden) override;
void cleanup() override;
void reset_for_next_ps_execution() override;
};
/**
@ -6884,7 +6885,7 @@ public:
{
result->abort_result_set(); /* purecov: inspected */
}
void cleanup() override
void reset_for_next_ps_execution() override
{
send_records= 0;
}
@ -6987,7 +6988,7 @@ public:
uint hidden) override;
bool init_result_table(ulonglong select_options);
int send_data(List<Item> &items) override;
void cleanup() override;
void reset_for_next_ps_execution() override;
ha_rows get_null_count_of_col(uint idx)
{
DBUG_ASSERT(idx < table->s->fields);
@ -7020,7 +7021,7 @@ public:
bool mx, bool all):
select_subselect(thd_arg, item_arg), cache(0), fmax(mx), is_all(all)
{}
void cleanup() override;
void reset_for_next_ps_execution() override;
int send_data(List<Item> &items) override;
bool cmp_real();
bool cmp_int();
@ -7437,7 +7438,7 @@ public:
int send_data(List<Item> &items) override;
bool send_eof() override;
bool check_simple_select() const override;
void cleanup() override;
void reset_for_next_ps_execution() override;
};
/* Bits in sql_command_flags */