MySQL 8.0.40
Source Code Documentation
heap.h File Reference
#include "my_base.h"
#include <sys/types.h>
#include <time.h>
#include "my_compare.h"
#include "my_inttypes.h"
#include "my_list.h"
#include "my_tree.h"
#include "thr_lock.h"

Go to the source code of this file.

Classes

struct  HEAPINFO
 
struct  HP_PTRS
 
struct  st_level_info
 
struct  HP_BLOCK
 
struct  HP_KEYDEF
 
struct  HP_SHARE
 
struct  HP_INFO
 
struct  HP_HEAP_POSITION
 
struct  HP_CREATE_INFO
 

Macros

#define HP_MAX_LEVELS   4 /* 128^5 records is enough */
 
#define HP_PTRS_IN_NOD   128
 

Typedefs

typedef ucharHEAP_PTR
 

Functions

HP_INFOheap_open (const char *name, int mode)
 
HP_INFOheap_open_from_share (HP_SHARE *share, int mode)
 
HP_INFOheap_open_from_share_and_register (HP_SHARE *share, int mode)
 
void heap_release_share (HP_SHARE *share, bool single_instance)
 Dereference a HEAP share and free it if it's not referenced. More...
 
int heap_close (HP_INFO *info)
 
int heap_write (HP_INFO *info, const uchar *buff)
 
int heap_update (HP_INFO *info, const uchar *old, const uchar *newdata)
 
int heap_rrnd (HP_INFO *info, uchar *buf, HP_HEAP_POSITION *pos)
 
int heap_scan_init (HP_INFO *info)
 
int heap_scan (HP_INFO *info, uchar *record)
 
int heap_delete (HP_INFO *info, const uchar *buff)
 
int heap_info (HP_INFO *info, HEAPINFO *x, int flag)
 
int heap_create (const char *name, HP_CREATE_INFO *create_info, HP_SHARE **share, bool *created_new_share)
 
int heap_delete_table (const char *name)
 
void heap_drop_table (HP_INFO *info)
 
int heap_extra (HP_INFO *info, enum ha_extra_function function)
 
int heap_reset (HP_INFO *info)
 
int heap_rename (const char *old_name, const char *new_name)
 
int heap_panic (enum ha_panic_function flag)
 
int heap_rsame (HP_INFO *info, uchar *record, int inx)
 
int heap_rnext (HP_INFO *info, uchar *record)
 
int heap_rprev (HP_INFO *info, uchar *record)
 
int heap_rfirst (HP_INFO *info, uchar *record, int inx)
 
int heap_rlast (HP_INFO *info, uchar *record, int inx)
 
void heap_clear (HP_INFO *info)
 
void heap_clear_keys (HP_INFO *info)
 
int heap_disable_indexes (HP_INFO *info)
 
int heap_enable_indexes (HP_INFO *info)
 
int heap_indexes_are_disabled (HP_INFO *info)
 
void heap_update_auto_increment (HP_INFO *info, const uchar *record)
 
ha_rows hp_rb_records_in_range (HP_INFO *info, int inx, key_range *min_key, key_range *max_key)
 
int hp_panic (enum ha_panic_function flag)
 
int heap_rkey (HP_INFO *info, uchar *record, int inx, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag)
 
ucharheap_find (HP_INFO *info, int inx, const uchar *key)
 
int heap_check_heap (HP_INFO *info, bool print_status)
 
void heap_position (HP_INFO *info, HP_HEAP_POSITION *pos)
 

Macro Definition Documentation

◆ HP_MAX_LEVELS

#define HP_MAX_LEVELS   4 /* 128^5 records is enough */

◆ HP_PTRS_IN_NOD

#define HP_PTRS_IN_NOD   128

Typedef Documentation

◆ HEAP_PTR

typedef uchar* HEAP_PTR

Function Documentation

◆ heap_check_heap()

int heap_check_heap ( HP_INFO info,
bool  print_status 
)

◆ heap_clear()

void heap_clear ( HP_INFO info)

◆ heap_clear_keys()

void heap_clear_keys ( HP_INFO info)

◆ heap_close()

int heap_close ( HP_INFO info)

◆ heap_create()

int heap_create ( const char *  name,
HP_CREATE_INFO create_info,
HP_SHARE **  share,
bool *  created_new_share 
)

◆ heap_delete()

int heap_delete ( HP_INFO info,
const uchar buff 
)

◆ heap_delete_table()

int heap_delete_table ( const char *  name)

◆ heap_disable_indexes()

int heap_disable_indexes ( HP_INFO info)

◆ heap_drop_table()

void heap_drop_table ( HP_INFO info)

◆ heap_enable_indexes()

int heap_enable_indexes ( HP_INFO info)

◆ heap_extra()

int heap_extra ( HP_INFO info,
enum ha_extra_function  function 
)

◆ heap_find()

uchar * heap_find ( HP_INFO info,
int  inx,
const uchar key 
)

◆ heap_indexes_are_disabled()

int heap_indexes_are_disabled ( HP_INFO info)

◆ heap_info()

int heap_info ( HP_INFO info,
HEAPINFO x,
int  flag 
)

◆ heap_open()

HP_INFO * heap_open ( const char *  name,
int  mode 
)

◆ heap_open_from_share()

HP_INFO * heap_open_from_share ( HP_SHARE share,
int  mode 
)

◆ heap_open_from_share_and_register()

HP_INFO * heap_open_from_share_and_register ( HP_SHARE share,
int  mode 
)

◆ heap_panic()

int heap_panic ( enum ha_panic_function  flag)

◆ heap_position()

void heap_position ( HP_INFO info,
HP_HEAP_POSITION pos 
)

◆ heap_release_share()

void heap_release_share ( HP_SHARE share,
bool  single_instance 
)

Dereference a HEAP share and free it if it's not referenced.

We needn't check open_count for single instances.

◆ heap_rename()

int heap_rename ( const char *  old_name,
const char *  new_name 
)

◆ heap_reset()

int heap_reset ( HP_INFO info)

◆ heap_rfirst()

int heap_rfirst ( HP_INFO info,
uchar record,
int  inx 
)

◆ heap_rkey()

int heap_rkey ( HP_INFO info,
uchar record,
int  inx,
const uchar key,
key_part_map  keypart_map,
enum ha_rkey_function  find_flag 
)

◆ heap_rlast()

int heap_rlast ( HP_INFO info,
uchar record,
int  inx 
)

◆ heap_rnext()

int heap_rnext ( HP_INFO info,
uchar record 
)

◆ heap_rprev()

int heap_rprev ( HP_INFO info,
uchar record 
)

◆ heap_rrnd()

int heap_rrnd ( HP_INFO info,
uchar buf,
HP_HEAP_POSITION pos 
)

◆ heap_rsame()

int heap_rsame ( HP_INFO info,
uchar record,
int  inx 
)

◆ heap_scan()

int heap_scan ( HP_INFO info,
uchar record 
)

◆ heap_scan_init()

int heap_scan_init ( HP_INFO info)

◆ heap_update()

int heap_update ( HP_INFO info,
const uchar old,
const uchar newdata 
)

◆ heap_update_auto_increment()

void heap_update_auto_increment ( HP_INFO info,
const uchar record 
)

◆ heap_write()

int heap_write ( HP_INFO info,
const uchar buff 
)

◆ hp_panic()

int hp_panic ( enum ha_panic_function  flag)

◆ hp_rb_records_in_range()

ha_rows hp_rb_records_in_range ( HP_INFO info,
int  inx,
key_range min_key,
key_range max_key 
)