MySQL 8.4.2
Source Code Documentation
|
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
#include <sys/types.h>
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_io.h"
#include "mysql/psi/mysql_file.h"
#include "storage/myisam/myisamdef.h"
#include "storage/myisammrg/myrg_def.h"
#include "strmake.h"
#include "typelib.h"
Functions | |
MYRG_INFO * | myrg_open (const char *name, int mode, int handle_locking) |
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_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_detach_children | ( | MYRG_INFO * | m_info | ) |
Detach children from a MyISAM MERGE parent table.
[in] | m_info | MERGE parent table structure |
0 | OK |
MYRG_INFO * myrg_open | ( | const char * | name, |
int | mode, | ||
int | handle_locking | ||
) |
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 |