mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge 11.0 into 11.1
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "sql_array.h" /* Dynamic_array<> */
|
||||
#include "mdl.h"
|
||||
#include "vers_string.h"
|
||||
#include "ha_handler_stats.h"
|
||||
#include "optimizer_costs.h"
|
||||
|
||||
#include "sql_analyze_stmt.h" // for Exec_time_tracker
|
||||
@@ -3151,6 +3152,9 @@ protected:
|
||||
|
||||
ha_rows estimation_rows_to_insert;
|
||||
handler *lookup_handler;
|
||||
/* Statistics for the query. Updated if handler_stats.in_use is set */
|
||||
ha_handler_stats active_handler_stats;
|
||||
void set_handler_stats();
|
||||
public:
|
||||
handlerton *ht; /* storage engine of this handler */
|
||||
OPTIMIZER_COSTS *costs; /* Points to table->share->costs */
|
||||
@@ -3158,7 +3162,14 @@ public:
|
||||
uchar *dup_ref; /* Pointer to duplicate row */
|
||||
uchar *lookup_buffer;
|
||||
|
||||
/* General statistics for the table like number of row, file sizes etc */
|
||||
ha_statistics stats;
|
||||
/*
|
||||
Collect query stats here if pointer is != NULL.
|
||||
This is a pointer because if we do a clone of the handler, we want to
|
||||
use the original handler for collecting statistics.
|
||||
*/
|
||||
ha_handler_stats *handler_stats;
|
||||
|
||||
/** MultiRangeRead-related members: */
|
||||
range_seq_t mrr_iter; /* Iterator to traverse the range sequence */
|
||||
@@ -3356,8 +3367,8 @@ public:
|
||||
:table_share(share_arg), table(0),
|
||||
estimation_rows_to_insert(0),
|
||||
lookup_handler(this),
|
||||
ht(ht_arg), costs(0), ref(0), lookup_buffer(NULL), end_range(NULL),
|
||||
implicit_emptied(0),
|
||||
ht(ht_arg), costs(0), ref(0), lookup_buffer(NULL), handler_stats(NULL),
|
||||
end_range(NULL), implicit_emptied(0),
|
||||
mark_trx_read_write_done(0),
|
||||
check_table_binlog_row_based_done(0),
|
||||
check_table_binlog_row_based_result(0),
|
||||
@@ -5037,6 +5048,22 @@ public:
|
||||
{
|
||||
check_table_binlog_row_based_done= 0;
|
||||
}
|
||||
virtual void handler_stats_updated() {}
|
||||
|
||||
inline void ha_handler_stats_reset()
|
||||
{
|
||||
handler_stats= &active_handler_stats;
|
||||
active_handler_stats.reset();
|
||||
active_handler_stats.active= 1;
|
||||
handler_stats_updated();
|
||||
}
|
||||
inline void ha_handler_stats_disable()
|
||||
{
|
||||
handler_stats= 0;
|
||||
active_handler_stats.active= 0;
|
||||
handler_stats_updated();
|
||||
}
|
||||
|
||||
private:
|
||||
/* Cache result to avoid extra calls */
|
||||
inline void mark_trx_read_write()
|
||||
@@ -5397,6 +5424,7 @@ public:
|
||||
}
|
||||
|
||||
bool log_not_redoable_operation(const char *operation);
|
||||
|
||||
protected:
|
||||
Handler_share *get_ha_share_ptr();
|
||||
void set_ha_share_ptr(Handler_share *arg_ha_share);
|
||||
|
Reference in New Issue
Block a user