33#ifndef row0pread_histogram_h 
   34#define row0pread_histogram_h 
   48                             double sampling_percentage,
 
Definition: row0pread-histogram.h:40
 
std::atomic_size_t m_n_sampled
Number of rows sampled.
Definition: row0pread-histogram.h:181
 
dberr_t process_leaf_rec(const Parallel_reader::Ctx *ctx, row_prebuilt_t *prebuilt)
Process the record in the leaf page.
Definition: row0pread-histogram.cc:362
 
int m_sampling_seed
Sampling seed to be used for sampling.
Definition: row0pread-histogram.h:178
 
os_event_t m_end_buffer_event
Event to notify if the next row has been buffered.
Definition: row0pread-histogram.h:155
 
bool skip()
Check if the processing of the record needs to be skipped.
Definition: row0pread-histogram.cc:192
 
void set(byte *buf)
Set the buffer.
Definition: row0pread-histogram.h:72
 
Parallel_reader m_parallel_reader
The parallel reader.
Definition: row0pread-histogram.h:161
 
enum_sampling_method m_sampling_method
Sampling method to be used for sampling.
Definition: row0pread-histogram.h:172
 
void wait_for_end_of_buffering()
Wait till the buffering of the row is complete.
Definition: row0pread-histogram.cc:178
 
os_event_t m_start_buffer_event
Event to notify if the next row needs to be buffered.
Definition: row0pread-histogram.h:152
 
static std::uniform_real_distribution< double > m_distribution
Uniform distribution used by the random generator.
Definition: row0pread-histogram.h:169
 
dberr_t process_non_leaf_rec(const Parallel_reader::Ctx *ctx, row_prebuilt_t *prebuilt)
For each record in a non-leaf block at level 1 (if leaf level is 0) check if the child page needs to ...
Definition: row0pread-histogram.cc:286
 
double m_sampling_percentage
Sampling percentage to be used for sampling.
Definition: row0pread-histogram.h:175
 
dberr_t m_err
Error code when the row was buffered.
Definition: row0pread-histogram.h:158
 
bool is_error_set() const
Definition: row0pread-histogram.h:103
 
dberr_t run()
Start the sampling process.
Definition: row0pread-histogram.cc:250
 
dberr_t finish_callback(Parallel_reader::Thread_ctx *reader_thread_ctx)
Each parallel reader thread's end function.
Definition: row0pread-histogram.cc:115
 
void signal_start_of_buffering()
Signal that the next row needs to be buffered.
Definition: row0pread-histogram.cc:184
 
dberr_t sample_rec(const Parallel_reader::Ctx *ctx, const rec_t *rec, ulint *offsets, const dict_index_t *index, row_prebuilt_t *prebuilt)
Convert the row in InnoDB format to MySQL format and store in the buffer for server to use.
Definition: row0pread-histogram.cc:254
 
bool init(trx_t *trx, dict_index_t *index, row_prebuilt_t *prebuilt)
Initialize the sampler context.
Definition: row0pread-histogram.cc:141
 
byte * m_buf
Buffer to store the sampled row which is in the MySQL format.
Definition: row0pread-histogram.h:149
 
dberr_t start_callback(Parallel_reader::Thread_ctx *reader_thread_ctx)
Each parallel reader thread's init function.
Definition: row0pread-histogram.cc:97
 
Histogram_sampler(size_t max_threads, int sampling_seed, double sampling_percentage, enum_sampling_method sampling_method)
Constructor.
Definition: row0pread-histogram.cc:45
 
void set_error_state(dberr_t err)
Set the error state.
Definition: row0pread-histogram.h:100
 
std::mt19937 m_random_generator
Random generator engine used to provide us random uniformly distributed values required to decide if ...
Definition: row0pread-histogram.h:166
 
void buffer_end()
End parallel read in case the reader thread is still active and wait for its exit.
Definition: row0pread-histogram.cc:240
 
~Histogram_sampler()
Destructor.
Definition: row0pread-histogram.cc:90
 
dberr_t buffer_next()
Buffer next row.
Definition: row0pread-histogram.cc:222
 
void wait_for_start_of_buffering()
Wait till there is a request to buffer the next row.
Definition: row0pread-histogram.cc:172
 
void signal_end_of_buffering()
Signal that the buffering of the row is complete.
Definition: row0pread-histogram.cc:188
 
Parallel reader execution context.
Definition: row0pread.h:685
 
The core idea is to find the left and right paths down the B+Tree.These paths correspond to the scan ...
Definition: row0pread.h:101
 
static char buf[MAX_BUF]
Definition: conf_to_src.cc:74
 
dberr_t
Definition: db0err.h:39
 
@ DB_SUCCESS
Definition: db0err.h:43
 
Definition: buf0block_hint.cc:30
 
bool index(const std::string &value, const String &search_for, uint32_t *idx)
Definition: contains.h:76
 
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:924
 
byte rec_t
Definition: rem0types.h:41
 
enum_sampling_method
Definition: handler.h:722
 
Thread related context information.
Definition: row0pread.h:215
 
Data structure for an index.
Definition: dict0mem.h:1041
 
InnoDB condition variable.
Definition: os0event.cc:63
 
A struct for (sometimes lazily) prebuilt structures in an Innobase table handle used within MySQL; th...
Definition: row0mysql.h:515
 
Definition: trx0trx.h:675
 
unsigned long int ulint
Definition: univ.i:406