130#define TPREFIX "[ib::Tester] " 
  134    std::cout << "[TLOG] thread=" << std::this_thread::get_id() << ": " << x \
 
  176  [[nodiscard]] 
Ret_t run(const 
std::
string &cmd) noexcept;
 
  181    return m_log.c_str();
 
  190  void init() noexcept;
 
  245#define DISPATCH_FUNCTION(func_)                        \ 
  248  [[nodiscard]] Ret_t func_(std::vector<std::string> &tokens) noexcept 
  270      std::vector<std::string> &tokens) 
noexcept;
 
  276      std::vector<std::string> &tokens) 
noexcept;
 
  317                          const 
size_t prefix_length);
 
  335  using Pair = std::pair<const std::string, Function_executor>;
 
  339  std::map<std::string, Function_executor, std::less<std::string>, 
Allocator>
 
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:48
 
uint32_t page_no_t
Page number.
Definition: api0api.h:46
 
#define MYSQL_THD
Definition: backup_page_tracker.h:38
 
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
 
Allocator that allows std::* containers to manage their memory through ut::malloc* and ut::free libra...
Definition: ut0new.h:2183
 
The low-level file system.
 
void print_tree(String *out, const char *tree_name, SEL_TREE *tree, const RANGE_OPT_PARAM *param, const bool print_full)
Definition: range_optimizer.cc:1692
 
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
 
Definition: ha_prototypes.h:342
 
int interpreter_run(const char *command) noexcept
The main function to execute the commands in the tester.
Definition: ut0test.cc:740
 
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
 
const char * table_name
Definition: rules_table_service.cc:56
 
Definition: gcs_xcom_synode.h:64
 
This file contains a set of libraries providing overloads for regular dynamic allocation routines whi...
Definition: aligned_alloc.h:48
 
std::basic_ostringstream< char, std::char_traits< char >, ut::allocator< char > > ostringstream
Specialization of basic_ostringstream which uses ut::allocator.
Definition: ut0new.h:2876
 
std::vector< T, ut::allocator< T > > vector
Specialization of vector which uses allocator.
Definition: ut0new.h:2880
 
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2884
 
Definition: system_variables_bits.h:153
 
Data structure for a database table.
Definition: dict0mem.h:1922
 
This class contains implementations of the commands that can be executed at server side by passing th...
Definition: ut0test.h:152
 
std::string m_log
The actual log data that is shared with the client via the thread-variable innodb_interpreter_output.
Definition: ut0test.h:329
 
std::list< dict_table_t *, ut::allocator< dict_table_t * > > m_open_tables
List of open tables.
Definition: ut0test.h:321
 
void clear_output() noexcept
Make the output empty.
Definition: ut0test.cc:736
 
Ret_t clear_page_prefix(const space_id_t space_id, page_no_t page_no, const size_t prefix_length)
Make the first prefix_length bytes of the given page as zeroes.
Definition: ut0test.cc:447
 
DISPATCH_FUNCTION(count_used_and_free)
Count various page_types for given tablespace.
 
Ret_t
The return status code used by the various commands in this module.
Definition: ut0test.h:155
 
@ RET_CMD_TBD
Definition: ut0test.h:160
 
@ RET_PASS
Definition: ut0test.h:156
 
@ RET_FAIL
Definition: ut0test.h:157
 
Ret_t corrupt_ondisk_root_page(std::vector< std::string > &tokens) noexcept
Corrupt the root page of the given table.
Definition: ut0test.cc:411
 
DISPATCH_FUNCTION(dblwr_force_crash)
Set the dblwr::Force_crash to the desired page.
 
void close_table(dict_table_t *table) noexcept
Close the given table.
Definition: ut0test.cc:638
 
std::pair< const std::string, Function_executor > Pair
Definition: ut0test.h:335
 
Tester() noexcept
Default constructor.
Definition: ut0test.cc:57
 
Ret_t find_ondisk_page_type(std::vector< std::string > &tokens) noexcept
Find the on-disk page type of the given page.
Definition: ut0test.cc:284
 
Ret_t corrupt_ondisk_page0(std::vector< std::string > &tokens) noexcept
Corrupt the first page of the given tablespace.
Definition: ut0test.cc:529
 
DISPATCH_FUNCTION(make_ondisk_root_page_zeroes)
Fill the root page of the given table with zeroes.
 
Ret_t find_tablespace_file_name(std::vector< std::string > &tokens) noexcept
Obtain the file name of the given tablespace.
Definition: ut0test.cc:360
 
Ret_t open_table(std::vector< std::string > &tokens) noexcept
Open the specified table.
Definition: ut0test.cc:179
 
void destroy() noexcept
Destroy the tester object.
Definition: ut0test.cc:650
 
THD * m_thd
Current thread object.
Definition: ut0test.h:324
 
Ret_t find_space_id(std::vector< std::string > &tokens) noexcept
Find the space_id of the given table.
Definition: ut0test.cc:204
 
std::string m_command
The latest command executed.
Definition: ut0test.h:332
 
const char * get_last_log() const noexcept
Get the last generated output.
Definition: ut0test.h:180
 
Ret_t find_flush_sync_lsn(std::vector< std::string > &tokens) noexcept
Find the flush sync lsn from the buffer pool module.
Definition: ut0test.cc:659
 
Ret_t find_root_page_no(std::vector< std::string > &tokens) noexcept
Find the root page of the given table.
Definition: ut0test.cc:231
 
void append_output(const std::string &log) noexcept
Append the given string to the output value of the interpreter.
Definition: ut0test.cc:738
 
DISPATCH_FUNCTION(make_page_dirty)
Make the page dirty.
 
Ret_t find_fil_page_lsn(std::vector< std::string > &tokens) noexcept
Find the FIL_PAGE_LSN of the given page.
Definition: ut0test.cc:258
 
std::map< std::string, Function_executor, std::less< std::string >, Allocator > m_dispatch
Mapping b/w the command name and the function to execute.
Definition: ut0test.h:340
 
void set_output(const std::ostringstream &sout) noexcept
Set the output value of the interpreter.
Definition: ut0test.cc:730
 
void update_thd_variable() noexcept
Let the thread-variable innodb_interpreter_output point to the current output.
Definition: ut0test.cc:722
 
Ret_t print_dblwr_has_encrypted_pages(std::vector< std::string > &tokens) noexcept
Print the page type of pages in dblwr file to server error log.
Definition: ut0test.cc:621
 
DISPATCH_FUNCTION(find_tablespace_physical_page_size)
Obtain the page size of the given tablespace.
 
Ret_t run(ulong cmd) noexcept
Run the given command.
 
void init() noexcept
Initialize the internal state of the tester.
Definition: ut0test.cc:78
 
DISPATCH_FUNCTION(print_tree)
 
dict_table_t * is_table_open(const std::string &table_name) const noexcept
Check if the given table is already opened.
Definition: ut0test.cc:166
 
Ret_t(Tester::*)(std::vector< std::string > &) Function_executor
Definition: ut0test.h:334
 
DISPATCH_FUNCTION(count_page_type)
Count various page_types for given tablespace.
 
Definition: system_variables_bits.h:96
 
void ib_interpreter_update(MYSQL_THD thd, SYS_VAR *var, void *var_ptr, const void *save)
Update the innodb_interpreter_output system variable to let the user access the output generated by t...
Definition: ut0test.cc:746
 
int ib_interpreter_check(THD *thd, SYS_VAR *var, void *save, struct st_mysql_value *value)
Check whether given command is valid for the InnoDB interpreter Refer to mysql_var_check_func() for m...
Definition: ut0test.cc:757