![]()  | 
  
    MySQL 8.0.44
    
   Source Code Documentation 
   | 
 
This class contains implementations of the commands that can be executed at server side by passing them via the innodb_interpreter system variable. More...
#include <ut0test.h>
Public Types | |
| enum | Ret_t { RET_PASS = 0 , RET_FAIL = 1 , RET_CMD_TBD = 2 } | 
| The return status code used by the various commands in this module.  More... | |
Public Member Functions | |
| Tester () noexcept | |
| Default constructor.  More... | |
| Ret_t | run (ulong cmd) noexcept | 
| Run the given command.  More... | |
| Ret_t | run (const std::string &cmd) noexcept | 
| Run the given command.  More... | |
| const char * | get_last_log () const noexcept | 
| Get the last generated output.  More... | |
| void | update_thd_variable () noexcept | 
| Let the thread-variable innodb_interpreter_output point to the current output.  More... | |
Private Types | |
| using | Function_executor = Ret_t(Tester::*)(std::vector< std::string > &) | 
| using | Pair = std::pair< const std::string, Function_executor > | 
| using | Allocator = ut::allocator< Pair > | 
Private Member Functions | |
| void | init () noexcept | 
| Initialize the internal state of the tester.  More... | |
| Ret_t | open_table (std::vector< std::string > &tokens) noexcept | 
| Open the specified table.  More... | |
| void | close_table (dict_table_t *table) noexcept | 
| Close the given table.  More... | |
| Ret_t | find_space_id (std::vector< std::string > &tokens) noexcept | 
| Find the space_id of the given table.  More... | |
| Ret_t | find_root_page_no (std::vector< std::string > &tokens) noexcept | 
| Find the root page of the given table.  More... | |
| Ret_t | find_ondisk_page_type (std::vector< std::string > &tokens) noexcept | 
| Find the on-disk page type of the given page.  More... | |
| Ret_t | find_fil_page_lsn (std::vector< std::string > &tokens) noexcept | 
| Find the FIL_PAGE_LSN of the given page.  More... | |
| Ret_t | find_flush_sync_lsn (std::vector< std::string > &tokens) noexcept | 
| Find the flush sync lsn from the buffer pool module.  More... | |
| 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.  More... | |
| Ret_t | find_tablespace_file_name (std::vector< std::string > &tokens) noexcept | 
| Obtain the file name of the given tablespace.  More... | |
| DISPATCH_FUNCTION (count_page_type) | |
| Count various page_types for given tablespace.  More... | |
| DISPATCH_FUNCTION (count_used_and_free) | |
| Count various page_types for given tablespace.  More... | |
| DISPATCH_FUNCTION (find_tablespace_physical_page_size) | |
| Obtain the page size of the given tablespace.  More... | |
| DISPATCH_FUNCTION (make_ondisk_root_page_zeroes) | |
| Fill the root page of the given table with zeroes.  More... | |
| DISPATCH_FUNCTION (make_page_dirty) | |
| Make the page dirty.  More... | |
| Ret_t | corrupt_ondisk_root_page (std::vector< std::string > &tokens) noexcept | 
| Corrupt the root page of the given table.  More... | |
| Ret_t | corrupt_ondisk_page0 (std::vector< std::string > &tokens) noexcept | 
| Corrupt the first page of the given tablespace.  More... | |
| DISPATCH_FUNCTION (dblwr_force_crash) | |
| Set the dblwr::Force_crash to the desired page.  More... | |
| void | destroy () noexcept | 
| Destroy the tester object.  More... | |
| dict_table_t * | is_table_open (const std::string &table_name) const noexcept | 
| Check if the given table is already opened.  More... | |
| void | set_output (const std::ostringstream &sout) noexcept | 
| Set the output value of the interpreter.  More... | |
| void | set_output (const std::string &log) noexcept | 
| Set the output value of the interpreter to the given value.  More... | |
| void | append_output (const std::string &log) noexcept | 
| Append the given string to the output value of the interpreter.  More... | |
| void | clear_output () noexcept | 
| Make the output empty.  More... | |
| 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.  More... | |
Private Attributes | |
| std::list< dict_table_t *, ut::allocator< dict_table_t * > > | m_open_tables {} | 
| List of open tables.  More... | |
| THD * | m_thd {} | 
| Current thread object.  More... | |
| std::string | m_log {} | 
| The actual log data that is shared with the client via the thread-variable innodb_interpreter_output.  More... | |
| std::string | m_command {} | 
| The latest command executed.  More... | |
| std::map< std::string, Function_executor, std::less< std::string >, Allocator > | m_dispatch | 
| Mapping b/w the command name and the function to execute.  More... | |
This class contains implementations of the commands that can be executed at server side by passing them via the innodb_interpreter system variable.
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
| enum ib::Tester::Ret_t | 
      
  | 
  noexcept | 
Default constructor.
      
  | 
  privatenoexcept | 
Append the given string to the output value of the interpreter.
| [in] | log | the output string to be appended | 
      
  | 
  privatenoexcept | 
Make the output empty.
      
  | 
  private | 
Make the first prefix_length bytes of the given page as zeroes.
| [in] | space_id | the tablespace identifier of the page to be zeroed. | 
| [in] | page_no | page number within the given tablespace. | 
| [in] | prefix_length | the length of the page, from beginning, to be zeroed. | 
      
  | 
  privatenoexcept | 
Close the given table.
| [in] | table | the table object | 
      
  | 
  privatenoexcept | 
Corrupt the first page of the given tablespace.
| [in] | tokens | the given command line | 
      
  | 
  privatenoexcept | 
Corrupt the root page of the given table.
| [in] | tokens | the given command line | 
      
  | 
  privatenoexcept | 
Destroy the tester object.
      
  | 
  private | 
Count various page_types for given tablespace.
      
  | 
  private | 
Count various page_types for given tablespace.
      
  | 
  private | 
Set the dblwr::Force_crash to the desired page.
This will crash the server after flushing the page to dblwr.
      
  | 
  private | 
Obtain the page size of the given tablespace.
      
  | 
  private | 
Fill the root page of the given table with zeroes.
      
  | 
  private | 
Make the page dirty.
It takes two arguments. make_page_dirty space_id page_no
      
  | 
  privatenoexcept | 
Find the FIL_PAGE_LSN of the given page.
| [in] | tokens | the given command line | 
      
  | 
  privatenoexcept | 
Find the flush sync lsn from the buffer pool module.
| [in] | tokens | the given command line | 
      
  | 
  privatenoexcept | 
Find the on-disk page type of the given page.
| [in] | tokens | the given command line | 
      
  | 
  privatenoexcept | 
Find the root page of the given table.
| [in] | tokens | the given command line | 
      
  | 
  privatenoexcept | 
Find the space_id of the given table.
| [in] | tokens | the given command line | 
      
  | 
  privatenoexcept | 
Obtain the file name of the given tablespace.
| [in] | tokens | the given command line | 
      
  | 
  inlinenoexcept | 
Get the last generated output.
      
  | 
  privatenoexcept | 
Initialize the internal state of the tester.
      
  | 
  privatenoexcept | 
Check if the given table is already opened.
| [in] | table_name | name of the table to open. | 
      
  | 
  privatenoexcept | 
Open the specified table.
| [in] | tokens | the given command line | 
      
  | 
  privatenoexcept | 
Print the page type of pages in dblwr file to server error log.
| [in] | tokens | the given command line | 
      
  | 
  noexcept | 
Run the given command.
| [in] | cmd | the command to run. | 
      
  | 
  noexcept | 
Run the given command.
| [in] | cmd | the command to run. | 
      
  | 
  privatenoexcept | 
Set the output value of the interpreter.
| [in] | sout | the output string stream containing the output string. | 
      
  | 
  privatenoexcept | 
Set the output value of the interpreter to the given value.
| [in] | log | the output string | 
      
  | 
  noexcept | 
Let the thread-variable innodb_interpreter_output point to the current output.
 
      
  | 
  private | 
The latest command executed.
      
  | 
  private | 
Mapping b/w the command name and the function to execute.
      
  | 
  private | 
The actual log data that is shared with the client via the thread-variable innodb_interpreter_output.
(Search for the variable interpreter_output in the file ha_innodb.cc)
      
  | 
  private | 
List of open tables.
      
  | 
  private | 
Current thread object.