24#ifndef PLUGIN_SECONDARY_ENGINE_MOCK_HA_MOCK_H_ 
   25#define PLUGIN_SECONDARY_ENGINE_MOCK_HA_MOCK_H_ 
   64  int open(
const char *
name, 
int mode, 
unsigned int test_if_locked,
 
   67  int close()
 override { 
return 0; }
 
   73  int rnd_pos(
unsigned char *, 
unsigned char *)
 override {
 
   77  int info(
unsigned int) 
override;
 
   82  void position(
const unsigned char *)
 override {}
 
   84  unsigned long index_flags(
unsigned int, 
unsigned int, 
bool) 
const override;
 
   91  const char *
table_type()
 const override { 
return "MOCK"; }
 
   96                   bool error_if_not_loaded) 
override;
 
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
 
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4412
 
TABLE_SHARE * table_share
Definition: handler.h:4419
 
ulonglong Table_flags
Definition: handler.h:4416
 
TABLE * table
Definition: handler.h:4420
 
The MOCK storage engine is used for testing MySQL server functionality related to secondary storage e...
Definition: ha_mock.h:55
 
int rnd_init(bool) override
rnd_init() can be called two times without rnd_end() in between (it only makes sense if scan=1).
Definition: ha_mock.h:69
 
const char * table_type() const override
The following can be called without an open handler.
Definition: ha_mock.h:91
 
int load_table(const TABLE &table) override
Loads a table into its defined secondary storage engine.
Definition: ha_mock.cc:203
 
int create(const char *, TABLE *, HA_CREATE_INFO *, dd::Table *) override
Create table (implementation).
Definition: ha_mock.h:60
 
int unload_table(const char *db_name, const char *table_name, bool error_if_not_loaded) override
Unloads a table from its defined secondary storage engine.
Definition: ha_mock.cc:215
 
THR_LOCK_DATA m_lock
Definition: ha_mock.h:98
 
int close() override
Definition: ha_mock.h:67
 
void position(const unsigned char *) override
Definition: ha_mock.h:82
 
int info(unsigned int) override
General method to gather info from handler.
Definition: ha_mock.cc:155
 
int rnd_pos(unsigned char *, unsigned char *) override
Definition: ha_mock.h:73
 
ha_rows records_in_range(unsigned int index, key_range *min_key, key_range *max_key) override
Find number of records in a range.
Definition: ha_mock.cc:189
 
unsigned long index_flags(unsigned int, unsigned int, bool) const override
Definition: ha_mock.cc:171
 
Table_flags table_flags() const override
Definition: ha_mock.cc:165
 
ha_mock(handlerton *hton, TABLE_SHARE *table_share)
Definition: ha_mock.cc:140
 
int rnd_next(unsigned char *) override
Definition: ha_mock.h:71
 
THR_LOCK_DATA ** store_lock(THD *thd, THR_LOCK_DATA **to, thr_lock_type lock_type) override
Is not invoked for non-transactional temporary tables.
Definition: ha_mock.cc:195
 
int open(const char *name, int mode, unsigned int test_if_locked, const dd::Table *table_def) override
Definition: ha_mock.cc:143
 
A table definition from the master.
Definition: rpl_utility.h:248
 
This file includes constants used by all storage engines.
 
my_off_t ha_rows
Definition: my_base.h:1140
 
#define HA_ERR_WRONG_COMMAND
Command not supported.
Definition: my_base.h:840
 
#define HA_ERR_END_OF_FILE
end in next/prev/first/last
Definition: my_base.h:852
 
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
 
Definition: ha_mock.cc:138
 
const char * table_name
Definition: rules_table_service.cc:56
 
const char * db_name
Definition: rules_table_service.cc:55
 
mode
Definition: file_handle.h:61
 
case opt name
Definition: sslopt-case.h:33
 
Struct to hold information about the table that should be created.
Definition: handler.h:3045
 
This structure is shared between different table objects.
Definition: table.h:691
 
Definition: thr_lock.h:124
 
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2622
 
Definition: my_base.h:1124
 
thr_lock_type
Definition: thr_lock.h:51