MySQL 8.0.39
Source Code Documentation
|
This file should be included when using merge isam functions. More...
#include <sys/types.h>
#include "my_base.h"
#include "my_inttypes.h"
#include "my_list.h"
#include "my_macros.h"
#include "myisam.h"
#include "mysql/psi/mysql_mutex.h"
#include "storage/myisam/queues.h"
#include "typelib.h"
Go to the source code of this file.
Classes | |
struct | MYMERGE_INFO |
struct | MYRG_TABLE |
struct | MYRG_INFO |
Macros | |
#define | MYRG_NAME_EXT ".MRG" |
#define | MERGE_INSERT_DISABLED 0 |
#define | MERGE_INSERT_TO_FIRST 1 |
#define | MERGE_INSERT_TO_LAST 2 |
Functions | |
int | myrg_close (MYRG_INFO *file) |
int | myrg_delete (MYRG_INFO *file, const uchar *buff) |
MYRG_INFO * | myrg_open (const char *name, int mode, int wait_if_locked) |
MYRG_INFO * | myrg_parent_open (const char *parent_name, int(*callback)(void *, const char *), void *callback_param) |
Open parent table of a MyISAM MERGE table. More... | |
int | myrg_attach_children (MYRG_INFO *m_info, int handle_locking, MI_INFO *(*callback)(void *), void *callback_param, bool *need_compat_check) |
Attach children to a MyISAM MERGE parent table. More... | |
int | myrg_detach_children (MYRG_INFO *m_info) |
Detach children from a MyISAM MERGE parent table. More... | |
int | myrg_panic (enum ha_panic_function function) |
int | myrg_rfirst (MYRG_INFO *file, uchar *buf, int inx) |
int | myrg_rlast (MYRG_INFO *file, uchar *buf, int inx) |
int | myrg_rnext (MYRG_INFO *file, uchar *buf, int inx) |
int | myrg_rprev (MYRG_INFO *file, uchar *buf, int inx) |
int | myrg_rnext_same (MYRG_INFO *file, uchar *buf) |
int | myrg_rkey (MYRG_INFO *info, uchar *buf, int inx, const uchar *key, key_part_map keypart_map, enum ha_rkey_function search_flag) |
int | myrg_rrnd (MYRG_INFO *file, uchar *buf, ulonglong pos) |
int | myrg_update (MYRG_INFO *file, const uchar *old, uchar *new_rec) |
int | myrg_write (MYRG_INFO *info, uchar *rec) |
int | myrg_status (MYRG_INFO *file, MYMERGE_INFO *x, int flag) |
int | myrg_lock_database (MYRG_INFO *file, int lock_type) |
int | myrg_create (const char *name, const char **table_names, uint insert_method, bool fix_names) |
int | myrg_extra (MYRG_INFO *file, enum ha_extra_function function, void *extra_arg) |
int | myrg_reset (MYRG_INFO *info) |
ha_rows | myrg_records_in_range (MYRG_INFO *info, int inx, key_range *min_key, key_range *max_key) |
ha_rows | myrg_records (MYRG_INFO *info) |
ulonglong | myrg_position (MYRG_INFO *info) |
Variables | |
TYPELIB | merge_insert_method |
This file should be included when using merge isam functions.
#define MERGE_INSERT_DISABLED 0 |
#define MERGE_INSERT_TO_FIRST 1 |
#define MERGE_INSERT_TO_LAST 2 |
#define MYRG_NAME_EXT ".MRG" |
int myrg_attach_children | ( | MYRG_INFO * | m_info, |
int | handle_locking, | ||
MI_INFO *(*)(void *) | callback, | ||
void * | callback_param, | ||
bool * | need_compat_check | ||
) |
Attach children to a MyISAM MERGE parent table.
Call a callback function for each child table. The callback returns the MyISAM table handle of the child table. Check table definition match.
[in] | m_info | MERGE parent table structure |
[in] | handle_locking | if contains HA_OPEN_FOR_REPAIR, warn about incompatible child tables, but continue |
[in] | callback | function to call for each child table |
[in] | callback_param | data pointer to give to the callback |
[in] | need_compat_check | pointer to ha_myisammrg::need_compat_check (we need this one to decide if previously allocated buffers can be reused). |
0 | OK |
!= | 0 Error |
int myrg_close | ( | MYRG_INFO * | file | ) |
int myrg_create | ( | const char * | name, |
const char ** | table_names, | ||
uint | insert_method, | ||
bool | fix_names | ||
) |
int myrg_detach_children | ( | MYRG_INFO * | m_info | ) |
Detach children from a MyISAM MERGE parent table.
[in] | m_info | MERGE parent table structure |
0 | OK |
int myrg_extra | ( | MYRG_INFO * | file, |
enum ha_extra_function | function, | ||
void * | extra_arg | ||
) |
int myrg_lock_database | ( | MYRG_INFO * | file, |
int | lock_type | ||
) |
MYRG_INFO * myrg_open | ( | const char * | name, |
int | mode, | ||
int | wait_if_locked | ||
) |
int myrg_panic | ( | enum ha_panic_function | function | ) |
MYRG_INFO * myrg_parent_open | ( | const char * | parent_name, |
int(*)(void *, const char *) | callback, | ||
void * | callback_param | ||
) |
Open parent table of a MyISAM MERGE table.
Open MERGE meta file to get the table name paths for the child tables. Count the children. Allocate and initialize MYRG_INFO structure. Call a callback function for each child table.
[in] | parent_name | merge table name path as "database/table" |
[in] | callback | function to call for each child table |
[in] | callback_param | data pointer to give to the callback |
!= | NULL OK |
NULL | Error |
ha_rows myrg_records_in_range | ( | MYRG_INFO * | info, |
int | inx, | ||
key_range * | min_key, | ||
key_range * | max_key | ||
) |
int myrg_reset | ( | MYRG_INFO * | info | ) |
int myrg_rkey | ( | MYRG_INFO * | info, |
uchar * | buf, | ||
int | inx, | ||
const uchar * | key, | ||
key_part_map | keypart_map, | ||
enum ha_rkey_function | search_flag | ||
) |
int myrg_status | ( | MYRG_INFO * | file, |
MYMERGE_INFO * | x, | ||
int | flag | ||
) |
|
extern |