drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzled::SEAPITesterCursor Class Reference
Inheritance diagram for drizzled::SEAPITesterCursor:
[legend]
Collaboration diagram for drizzled::SEAPITesterCursor:
[legend]

Public Member Functions

 SEAPITesterCursor (drizzled::plugin::StorageEngine &engine_arg, drizzled::Table &table_arg)
int close ()
int rnd_next (unsigned char *buf)
int rnd_pos (unsigned char *buf, unsigned char *pos)
void position (const unsigned char *record)
int info (uint32_t flag)
int reset ()
void get_auto_increment (uint64_t, uint64_t, uint64_t, uint64_t *, uint64_t *)
int doStartTableScan (bool scan)
int doEndTableScan ()
const char * index_type (uint32_t key_number)
int doStartIndexScan (uint32_t, bool)
int index_read (unsigned char *buf, const unsigned char *key_ptr, uint32_t key_len, drizzled::ha_rkey_function find_flag)
int index_read_idx_map (unsigned char *buf, uint32_t index, const unsigned char *key, drizzled::key_part_map keypart_map, drizzled::ha_rkey_function find_flag)
 Positions an index cursor to the index specified in the handle. Fetches the row if available. If the key value is null, begin at the first key of the index.
int index_next (unsigned char *buf)
int doEndIndexScan ()
int index_prev (unsigned char *buf)
int index_first (unsigned char *buf)
int index_last (unsigned char *buf)
bool primary_key_is_clustered ()
int doOpen (const identifier::Table &identifier, int mode, uint32_t test_if_locked)
THR_LOCK_DATA ** store_lock (Session *, THR_LOCK_DATA **to, enum thr_lock_type)
int external_lock (Session *session, int lock_type)
int doInsertRecord (unsigned char *buf)
int doUpdateRecord (const unsigned char *old_row, unsigned char *new_row)
double scan_time ()
int extra (enum ha_extra_function operation)
Public Member Functions inherited from drizzled::Cursor
plugin::StorageEngine * getEngine () const
TableShare * getShare ()
Table * getTable () const
uint64_t getNextInsertId () const
uint64_t getAutoIncrement () const
 Cursor (plugin::StorageEngine &engine_arg, Table &share_arg)
virtual Cursor * clone (memory::Root *mem_root)
int ha_open (const identifier::Table &identifier, int mode, int test_if_locked)
int startIndexScan (uint32_t idx, bool sorted) __attribute__((warn_unused_result))
int endIndexScan ()
int startTableScan (bool scan) __attribute__((warn_unused_result))
int endTableScan ()
int ha_reset ()
int ha_index_or_rnd_end ()
int ha_external_lock (Session *session, int lock_type)
int insertRecord (unsigned char *buf) __attribute__((warn_unused_result))
int updateRecord (const unsigned char *old_data, unsigned char *new_data) __attribute__((warn_unused_result))
int deleteRecord (const unsigned char *buf) __attribute__((warn_unused_result))
void ha_release_auto_increment ()
int ha_check (Session *)
void ha_start_bulk_insert (ha_rows rows)
int ha_end_bulk_insert ()
int ha_delete_all_rows ()
int ha_reset_auto_increment (uint64_t value)
int ha_analyze (Session *)
int ha_disable_indexes (uint32_t mode)
int ha_enable_indexes (uint32_t mode)
int ha_discard_or_import_tablespace (bool discard)
void closeMarkForDelete ()
void adjust_next_insert_id_after_explicit_value (uint64_t nr)
int update_auto_increment ()
virtual double read_time (uint32_t, uint32_t ranges, ha_rows rows)
virtual double index_only_read_time (uint32_t keynr, double records)
virtual ha_rows multi_range_read_info_const (uint32_t keyno, RANGE_SEQ_IF *seq, void *seq_init_param, uint32_t n_ranges, uint32_t *bufsz, uint32_t *flags, optimizer::CostVector *cost)
virtual int multi_range_read_info (uint32_t keyno, uint32_t n_ranges, uint32_t keys, uint32_t *bufsz, uint32_t *flags, optimizer::CostVector *cost)
virtual int multi_range_read_init (RANGE_SEQ_IF *seq, void *seq_init_param, uint32_t n_ranges, uint32_t mode)
virtual int multi_range_read_next (char **range_info)
virtual const key_map * keys_to_use_for_scanning ()
bool has_transactions ()
virtual bool is_fatal_error (int error, uint32_t flags)
virtual ha_rows records ()
virtual uint64_t tableSize ()
virtual uint64_t rowSize ()
virtual ha_rows estimate_rows_upper_bound ()
uint32_t get_index (void) const
virtual int index_read_map (unsigned char *buf, const unsigned char *key, key_part_map keypart_map, enum ha_rkey_function find_flag)
 Positions an index cursor to the index specified in the handle. Fetches the row if available. If the key value is null, begin at the first key of the index.
virtual int index_next_same (unsigned char *, const unsigned char *, uint32_t)
virtual int index_read_last_map (unsigned char *buf, const unsigned char *key, key_part_map keypart_map)
 The following functions works like index_read, but it find the last row with the current key value or prefix.
virtual int read_range_first (const key_range *start_key, const key_range *end_key, bool eq_range, bool sorted)
virtual int read_range_next ()
int compare_key (key_range *range)
virtual int read_first_row (unsigned char *buf, uint32_t primary_key)
virtual int rnd_same (unsigned char *, uint32_t)
virtual ha_rows records_in_range (uint32_t, key_range *, key_range *)
virtual uint32_t calculate_key_hash_value (Field **)
virtual int extra_opt (enum ha_extra_function operation, uint32_t)
virtual bool was_semi_consistent_read ()
virtual void try_semi_consistent_read (bool)
virtual void unlock_row (void)
void set_next_insert_id (uint64_t id)
void restore_auto_increment (uint64_t prev_insert_id)
virtual int indexes_are_disabled (void)
virtual void append_create_info (String *)
virtual char * get_foreign_key_create_info (void)
virtual bool can_switch_engines (void)
virtual int get_foreign_key_list (Session *, List< ForeignKeyInfo > *)
virtual uint32_t referenced_by_foreign_key ()
virtual void free_foreign_key_create_info (char *)
virtual int cmp_ref (const unsigned char *ref1, const unsigned char *ref2)
virtual bool isOrdered (void)

Public Attributes

drizzled::Cursor * realCursor
Public Attributes inherited from drizzled::Cursor
unsigned char * ref
unsigned char * dup_ref
ha_statistics stats
range_seq_t mrr_iter
RANGE_SEQ_IF mrr_funcs
uint32_t ranges_in_seq
bool mrr_is_output_sorted
bool mrr_have_range
bool eq_range
KEY_MULTI_RANGE mrr_cur_range
key_range save_end_range
key_range * end_range
KeyPartInfo * range_key_part
int key_compare_result_on_equal
uint32_t errkey
uint32_t key_used_on_scan
uint32_t active_index
uint32_t ref_length
enum drizzled::Cursor:: { ... }  inited
bool locked
uint64_t next_insert_id
uint64_t insert_id_for_cur_row
Discrete_interval auto_inc_interval_for_cur_row

Private Member Functions

void CURSOR_NEW_STATE (const string &new_state)

Private Attributes

string cursor_state
Session * user_session
uint64_t id

Friends

class drizzled::Cursor

Additional Inherited Members

Public Types inherited from drizzled::Cursor
enum  { NONE =0 , INDEX , RND }
Protected Member Functions inherited from drizzled::Cursor
void ha_statistic_increment (uint64_t system_status_var::*offset) const
void ** ha_data (Session *) const
Protected Attributes inherited from drizzled::Cursor
ha_rows estimation_rows_to_insert

Detailed Description

Definition at line 151 of file storage_engine_api_tester.cc.

Constructor & Destructor Documentation

◆ SEAPITesterCursor()

drizzled::SEAPITesterCursor::SEAPITesterCursor ( drizzled::plugin::StorageEngine & engine_arg,
drizzled::Table & table_arg )
inline

Definition at line 157 of file storage_engine_api_tester.cc.

◆ ~SEAPITesterCursor()

drizzled::SEAPITesterCursor::~SEAPITesterCursor ( )
inline

Definition at line 167 of file storage_engine_api_tester.cc.

Member Function Documentation

◆ close()

int drizzled::SEAPITesterCursor::close ( void )
virtual

Implements drizzled::Cursor.

Definition at line 288 of file storage_engine_api_tester.cc.

◆ CURSOR_NEW_STATE()

void drizzled::SEAPITesterCursor::CURSOR_NEW_STATE ( const string & new_state)
private

Definition at line 430 of file storage_engine_api_tester.cc.

◆ doEndIndexScan()

int drizzled::SEAPITesterCursor::doEndIndexScan ( void )
virtual

Reimplemented from drizzled::Cursor.

Definition at line 378 of file storage_engine_api_tester.cc.

◆ doEndTableScan()

int drizzled::SEAPITesterCursor::doEndTableScan ( void )
inlinevirtual

Reimplemented from drizzled::Cursor.

Definition at line 191 of file storage_engine_api_tester.cc.

◆ doInsertRecord()

int drizzled::SEAPITesterCursor::doInsertRecord ( unsigned char * buf)
inlinevirtual

Reimplemented from drizzled::Cursor.

Definition at line 224 of file storage_engine_api_tester.cc.

◆ doOpen()

int drizzled::SEAPITesterCursor::doOpen ( const identifier::Table & identifier,
int mode,
uint32_t test_if_locked )
virtual

Reimplemented from drizzled::Cursor.

Definition at line 269 of file storage_engine_api_tester.cc.

◆ doStartIndexScan()

int drizzled::SEAPITesterCursor::doStartIndexScan ( uint32_t keynr,
bool scan )
virtual

Reimplemented from drizzled::Cursor.

Definition at line 331 of file storage_engine_api_tester.cc.

◆ doStartTableScan()

int drizzled::SEAPITesterCursor::doStartTableScan ( bool scan)
inlinevirtual

doStartTableScan() can be called two times without doEndTableScan() in between (it only makes sense if scan=1). then the second call should prepare for the new table scan (e.g if rnd_init allocates the cursor, second call should position it to the start of the table, no need to deallocate and allocate it again

Implements drizzled::Cursor.

Definition at line 190 of file storage_engine_api_tester.cc.

◆ doUpdateRecord()

int drizzled::SEAPITesterCursor::doUpdateRecord ( const unsigned char * old_row,
unsigned char * new_row )
inlinevirtual

Reimplemented from drizzled::Cursor.

Definition at line 244 of file storage_engine_api_tester.cc.

◆ external_lock()

int drizzled::SEAPITesterCursor::external_lock ( Session * ,
int  )
virtual

Is not invoked for non-transactional temporary tables.

Tells the storage engine that we intend to read or write data from the table. This call is prefixed with a call to Cursor::store_lock() and is invoked only for those Cursor instances that stored the lock.

Calls to rnd_init/index_init are prefixed with this call. When table IO is complete, we call external_lock(F_UNLCK). A storage engine writer should expect that each call to ::external_lock(F_[RD|WR]LOCK is followed by a call to ::external_lock(F_UNLCK). If it is not, it is a bug in MySQL.

The name and signature originate from the first implementation in MyISAM, which would call fcntl to set/clear an advisory lock on the data file in this method.

Parameters
lock_typeF_RDLCK, F_WRLCK, F_UNLCK
Returns
non-0 in case of failure, 0 in case of success. When lock_type is F_UNLCK, the return value is ignored.

Reimplemented from drizzled::Cursor.

Definition at line 410 of file storage_engine_api_tester.cc.

◆ extra()

int drizzled::SEAPITesterCursor::extra ( enum ha_extra_function operation)
inlinevirtual

Reimplemented from drizzled::Cursor.

Definition at line 257 of file storage_engine_api_tester.cc.

◆ get_auto_increment()

void drizzled::SEAPITesterCursor::get_auto_increment ( uint64_t ,
uint64_t ,
uint64_t ,
uint64_t * ,
uint64_t *  )
inlinevirtual

Implements drizzled::Cursor.

Definition at line 189 of file storage_engine_api_tester.cc.

◆ index_first()

int drizzled::SEAPITesterCursor::index_first ( unsigned char * buf)
virtual

Reimplemented from drizzled::Cursor.

Definition at line 396 of file storage_engine_api_tester.cc.

◆ index_last()

int drizzled::SEAPITesterCursor::index_last ( unsigned char * buf)
virtual

Reimplemented from drizzled::Cursor.

Definition at line 403 of file storage_engine_api_tester.cc.

◆ index_next()

int drizzled::SEAPITesterCursor::index_next ( unsigned char * buf)
virtual

Reimplemented from drizzled::Cursor.

Definition at line 371 of file storage_engine_api_tester.cc.

◆ index_prev()

int drizzled::SEAPITesterCursor::index_prev ( unsigned char * buf)
virtual

Reimplemented from drizzled::Cursor.

Definition at line 389 of file storage_engine_api_tester.cc.

◆ index_read()

int drizzled::SEAPITesterCursor::index_read ( unsigned char * buf,
const unsigned char * key_ptr,
uint32_t key_len,
drizzled::ha_rkey_function find_flag )

Definition at line 350 of file storage_engine_api_tester.cc.

◆ index_read_idx_map()

int drizzled::SEAPITesterCursor::index_read_idx_map ( unsigned char * buf,
uint32_t index,
const unsigned char * key,
drizzled::key_part_map keypart_map,
drizzled::ha_rkey_function find_flag )
virtual

Positions an index cursor to the index specified in the handle. Fetches the row if available. If the key value is null, begin at the first key of the index.

Reimplemented from drizzled::Cursor.

Definition at line 360 of file storage_engine_api_tester.cc.

◆ index_type()

const char * drizzled::SEAPITesterCursor::index_type ( uint32_t key_number)
virtual

Reimplemented from drizzled::Cursor.

Definition at line 325 of file storage_engine_api_tester.cc.

◆ info()

int drizzled::SEAPITesterCursor::info ( uint32_t flag)
virtual

Implements drizzled::Cursor.

Definition at line 306 of file storage_engine_api_tester.cc.

◆ position()

void drizzled::SEAPITesterCursor::position ( const unsigned char * record)
virtual

Implements drizzled::Cursor.

Definition at line 296 of file storage_engine_api_tester.cc.

◆ primary_key_is_clustered()

bool drizzled::SEAPITesterCursor::primary_key_is_clustered ( )
inlinevirtual

Reimplemented from drizzled::Cursor.

Definition at line 210 of file storage_engine_api_tester.cc.

◆ reset()

int drizzled::SEAPITesterCursor::reset ( void )
virtual

Reset state of file to after 'open'. This function is called after every statement for all tables used by that statement.

Reimplemented from drizzled::Cursor.

Definition at line 280 of file storage_engine_api_tester.cc.

◆ rnd_next()

int drizzled::SEAPITesterCursor::rnd_next ( unsigned char * buf)
inlinevirtual

Implements drizzled::Cursor.

Definition at line 171 of file storage_engine_api_tester.cc.

◆ rnd_pos()

int drizzled::SEAPITesterCursor::rnd_pos ( unsigned char * buf,
unsigned char * pos )
inlinevirtual

Implements drizzled::Cursor.

Definition at line 183 of file storage_engine_api_tester.cc.

◆ scan_time()

double drizzled::SEAPITesterCursor::scan_time ( void )
inlinevirtual

Reimplemented from drizzled::Cursor.

Definition at line 250 of file storage_engine_api_tester.cc.

◆ store_lock()

THR_LOCK_DATA ** drizzled::SEAPITesterCursor::store_lock ( Session * ,
THR_LOCK_DATA ** to,
enum thr_lock_type  )
virtual

Is not invoked for non-transactional temporary tables.

Note
store_lock() can return more than one lock if the table is MERGE or partitioned.
that one can NOT rely on table->in_use in store_lock(). It may refer to a different thread if called from abortLockForThread().
If the table is MERGE, store_lock() can return less locks than lock_count() claimed. This can happen when the MERGE children are not attached when this is called from another thread.

Reimplemented from drizzled::Cursor.

Definition at line 420 of file storage_engine_api_tester.cc.

◆ drizzled::Cursor

friend class drizzled::Cursor
friend

Definition at line 153 of file storage_engine_api_tester.cc.

Member Data Documentation

◆ cursor_state

string drizzled::SEAPITesterCursor::cursor_state
private

Definition at line 263 of file storage_engine_api_tester.cc.

◆ id

uint64_t drizzled::SEAPITesterCursor::id
private

Definition at line 266 of file storage_engine_api_tester.cc.

◆ realCursor

drizzled::Cursor* drizzled::SEAPITesterCursor::realCursor

Definition at line 155 of file storage_engine_api_tester.cc.

◆ user_session

Session* drizzled::SEAPITesterCursor::user_session
private

Definition at line 265 of file storage_engine_api_tester.cc.


The documentation for this class was generated from the following file: