MySQL 8.0.39
Source Code Documentation
mi_dynrec.cc File Reference
#include "my_config.h"
#include <fcntl.h>
#include <sys/types.h>
#include <algorithm>
#include "my_byteorder.h"
#include "my_compiler.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_io.h"
#include "my_macros.h"
#include "my_pointer_arithmetic.h"
#include "sql/field.h"
#include "storage/myisam/myisam_sys.h"
#include "storage/myisam/myisamdef.h"

Functions

static int write_dynamic_record (MI_INFO *info, uchar *record, ulong reclength)
 
static int _mi_find_writepos (MI_INFO *info, ulong reclength, my_off_t *filepos, ulong *length)
 
static int update_dynamic_record (MI_INFO *info, my_off_t filepos, uchar *record, ulong reclength)
 
static int delete_dynamic_record (MI_INFO *info, my_off_t filepos, uint second_read)
 
static int _mi_cmp_buffer (File file, const uchar *buff, my_off_t filepos, uint length)
 
bool mi_dynmap_file (MI_INFO *info, my_off_t size)
 
int mi_munmap_file (MI_INFO *info)
 
void mi_remap_file (MI_INFO *info, my_off_t size)
 
size_t mi_mmap_pread (MI_INFO *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags)
 
size_t mi_nommap_pread (MI_INFO *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags)
 
size_t mi_mmap_pwrite (MI_INFO *info, const uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags)
 
size_t mi_nommap_pwrite (MI_INFO *info, const uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags)
 
int _mi_write_dynamic_record (MI_INFO *info, const uchar *record)
 
int _mi_update_dynamic_record (MI_INFO *info, my_off_t pos, const uchar *record)
 
int _mi_write_blob_record (MI_INFO *info, const uchar *record)
 
int _mi_update_blob_record (MI_INFO *info, my_off_t pos, const uchar *record)
 
int _mi_delete_dynamic_record (MI_INFO *info)
 
static bool unlink_deleted_block (MI_INFO *info, MI_BLOCK_INFO *block_info)
 
static int update_backward_delete_link (MI_INFO *info, my_off_t delete_block, my_off_t filepos)
 
int _mi_write_part_record (MI_INFO *info, my_off_t filepos, ulong length, my_off_t next_filepos, uchar **record, ulong *reclength, int *flag)
 
uint _mi_rec_pack (MI_INFO *info, uchar *to, const uchar *from)
 
bool _mi_rec_check (MI_INFO *info, const uchar *record, uchar *rec_buff, ulong packed_length, bool with_checksum)
 
size_t _mi_rec_unpack (MI_INFO *info, uchar *to, const uchar *from, ulong found_length)
 
ulong _my_calc_total_blob_length (MI_INFO *info, const uchar *record)
 
ulong _mi_calc_blob_length (uint length, const uchar *pos)
 
void _mi_store_blob_length (uchar *pos, uint pack_length, uint length)
 
int _mi_read_dynamic_record (MI_INFO *info, my_off_t filepos, uchar *buf)
 
int _mi_cmp_dynamic_unique (MI_INFO *info, MI_UNIQUEDEF *def, const uchar *record, my_off_t pos)
 
int _mi_cmp_dynamic_record (MI_INFO *info, const uchar *record)
 
int _mi_read_rnd_dynamic_record (MI_INFO *info, uchar *buf, my_off_t filepos, bool skip_deleted_blocks)
 
uint _mi_get_block_info (MI_BLOCK_INFO *info, File file, my_off_t filepos)
 

Variables

static char zero_string [] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
 

Function Documentation

◆ _mi_calc_blob_length()

ulong _mi_calc_blob_length ( uint  length,
const uchar pos 
)

◆ _mi_cmp_buffer()

static int _mi_cmp_buffer ( File  file,
const uchar buff,
my_off_t  filepos,
uint  length 
)
static

◆ _mi_cmp_dynamic_record()

int _mi_cmp_dynamic_record ( MI_INFO info,
const uchar record 
)

◆ _mi_cmp_dynamic_unique()

int _mi_cmp_dynamic_unique ( MI_INFO info,
MI_UNIQUEDEF def,
const uchar record,
my_off_t  pos 
)

◆ _mi_delete_dynamic_record()

int _mi_delete_dynamic_record ( MI_INFO info)

◆ _mi_find_writepos()

static int _mi_find_writepos ( MI_INFO info,
ulong  reclength,
my_off_t filepos,
ulong *  length 
)
static

◆ _mi_get_block_info()

uint _mi_get_block_info ( MI_BLOCK_INFO info,
File  file,
my_off_t  filepos 
)

◆ _mi_read_dynamic_record()

int _mi_read_dynamic_record ( MI_INFO info,
my_off_t  filepos,
uchar buf 
)

◆ _mi_read_rnd_dynamic_record()

int _mi_read_rnd_dynamic_record ( MI_INFO info,
uchar buf,
my_off_t  filepos,
bool  skip_deleted_blocks 
)

◆ _mi_rec_check()

bool _mi_rec_check ( MI_INFO info,
const uchar record,
uchar rec_buff,
ulong  packed_length,
bool  with_checksum 
)

◆ _mi_rec_pack()

uint _mi_rec_pack ( MI_INFO info,
uchar to,
const uchar from 
)

◆ _mi_rec_unpack()

size_t _mi_rec_unpack ( MI_INFO info,
uchar to,
const uchar from,
ulong  found_length 
)

◆ _mi_store_blob_length()

void _mi_store_blob_length ( uchar pos,
uint  pack_length,
uint  length 
)

◆ _mi_update_blob_record()

int _mi_update_blob_record ( MI_INFO info,
my_off_t  pos,
const uchar record 
)

◆ _mi_update_dynamic_record()

int _mi_update_dynamic_record ( MI_INFO info,
my_off_t  pos,
const uchar record 
)

◆ _mi_write_blob_record()

int _mi_write_blob_record ( MI_INFO info,
const uchar record 
)

◆ _mi_write_dynamic_record()

int _mi_write_dynamic_record ( MI_INFO info,
const uchar record 
)

◆ _mi_write_part_record()

int _mi_write_part_record ( MI_INFO info,
my_off_t  filepos,
ulong  length,
my_off_t  next_filepos,
uchar **  record,
ulong *  reclength,
int *  flag 
)

◆ _my_calc_total_blob_length()

ulong _my_calc_total_blob_length ( MI_INFO info,
const uchar record 
)

◆ delete_dynamic_record()

static int delete_dynamic_record ( MI_INFO info,
my_off_t  filepos,
uint  second_read 
)
static

◆ mi_dynmap_file()

bool mi_dynmap_file ( MI_INFO info,
my_off_t  size 
)

◆ mi_mmap_pread()

size_t mi_mmap_pread ( MI_INFO info,
uchar Buffer,
size_t  Count,
my_off_t  offset,
myf  MyFlags 
)

◆ mi_mmap_pwrite()

size_t mi_mmap_pwrite ( MI_INFO info,
const uchar Buffer,
size_t  Count,
my_off_t  offset,
myf  MyFlags 
)

◆ mi_munmap_file()

int mi_munmap_file ( MI_INFO info)

◆ mi_nommap_pread()

size_t mi_nommap_pread ( MI_INFO info,
uchar Buffer,
size_t  Count,
my_off_t  offset,
myf  MyFlags 
)

◆ mi_nommap_pwrite()

size_t mi_nommap_pwrite ( MI_INFO info,
const uchar Buffer,
size_t  Count,
my_off_t  offset,
myf  MyFlags 
)

◆ mi_remap_file()

void mi_remap_file ( MI_INFO info,
my_off_t  size 
)

◆ unlink_deleted_block()

static bool unlink_deleted_block ( MI_INFO info,
MI_BLOCK_INFO block_info 
)
static

◆ update_backward_delete_link()

static int update_backward_delete_link ( MI_INFO info,
my_off_t  delete_block,
my_off_t  filepos 
)
static

◆ update_dynamic_record()

static int update_dynamic_record ( MI_INFO info,
my_off_t  filepos,
uchar record,
ulong  reclength 
)
static

◆ write_dynamic_record()

static int write_dynamic_record ( MI_INFO info,
uchar record,
ulong  reclength 
)
static

Variable Documentation

◆ zero_string

char zero_string[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
static