MySQL 9.1.0
Source Code Documentation
myisampack.h File Reference

Storing of values in high byte first order. More...

#include "my_config.h"
#include <sys/types.h>
#include "my_inttypes.h"

Go to the source code of this file.

Macros

#define mi_int1store(T, A)   *((uchar *)(T)) = (uchar)(A)
 
#define mi_int2store(T, A)
 
#define mi_int3store(T, A)
 
#define mi_int4store(T, A)
 
#define mi_int5store(T, A)
 
#define mi_int6store(T, A)
 
#define mi_int7store(T, A)
 
#define mi_int8store(T, A)
 
#define mi_float4store(T, A)
 
#define mi_float8store(T, V)
 
#define mi_rowstore(T, A)   mi_int8store(T, A)
 
#define mi_rowkorr(T)   mi_uint8korr(T)
 
#define mi_sizestore(T, A)   mi_int8store(T, A)
 
#define mi_sizekorr(T)   mi_uint8korr(T)
 

Functions

static int8 mi_sint1korr (const uchar *A)
 
static uint8 mi_uint1korr (const uchar *A)
 
static int16 mi_sint2korr (const uchar *A)
 
static int32 mi_sint3korr (const uchar *A)
 
static int32 mi_sint4korr (const uchar *A)
 
static uint16 mi_uint2korr (const uchar *A)
 
static uint32 mi_uint3korr (const uchar *A)
 
static uint32 mi_uint4korr (const uchar *A)
 
static ulonglong mi_uint5korr (const uchar *A)
 
static ulonglong mi_uint6korr (const uchar *A)
 
static ulonglong mi_uint7korr (const uchar *A)
 
static ulonglong mi_uint8korr (const uchar *A)
 
static longlong mi_sint8korr (const uchar *A)
 
static float mi_float4get (const uchar *M)
 
static double mi_float8get (const uchar *M)
 

Detailed Description

Storing of values in high byte first order.

Integer keys and file pointers are stored with high byte first to get better compression.

Macro Definition Documentation

◆ mi_float4store

#define mi_float4store (   T,
 
)
Value:
{ \
((uchar *)(T))[0] = ((uchar *)&A)[3]; \
((uchar *)(T))[1] = ((uchar *)&A)[2]; \
((uchar *)(T))[2] = ((uchar *)&A)[1]; \
((uchar *)(T))[3] = ((uchar *)&A)[0]; \
}
unsigned char uchar
Definition: my_inttypes.h:52

◆ mi_float8store

#define mi_float8store (   T,
 
)
Value:
{ \
((uchar *)(T))[0] = ((uchar *)&V)[7]; \
((uchar *)(T))[1] = ((uchar *)&V)[6]; \
((uchar *)(T))[2] = ((uchar *)&V)[5]; \
((uchar *)(T))[3] = ((uchar *)&V)[4]; \
((uchar *)(T))[4] = ((uchar *)&V)[3]; \
((uchar *)(T))[5] = ((uchar *)&V)[2]; \
((uchar *)(T))[6] = ((uchar *)&V)[1]; \
((uchar *)(T))[7] = ((uchar *)&V)[0]; \
}

◆ mi_int1store

#define mi_int1store (   T,
 
)    *((uchar *)(T)) = (uchar)(A)

◆ mi_int2store

#define mi_int2store (   T,
 
)
Value:
{ \
const uint def_temp = (uint)(A); \
((uchar *)(T))[1] = (uchar)(def_temp); \
((uchar *)(T))[0] = (uchar)(def_temp >> 8); \
}

◆ mi_int3store

#define mi_int3store (   T,
 
)
Value:
{ /*lint -save -e734 */ \
const ulong def_temp = (ulong)(A); \
((uchar *)(T))[2] = (uchar)(def_temp); \
((uchar *)(T))[1] = (uchar)(def_temp >> 8); \
((uchar *)(T))[0] = (uchar)(def_temp >> 16); \
/*lint -restore */}

◆ mi_int4store

#define mi_int4store (   T,
 
)
Value:
{ \
const ulong def_temp = (ulong)(A); \
((uchar *)(T))[3] = (uchar)(def_temp); \
((uchar *)(T))[2] = (uchar)(def_temp >> 8); \
((uchar *)(T))[1] = (uchar)(def_temp >> 16); \
((uchar *)(T))[0] = (uchar)(def_temp >> 24); \
}

◆ mi_int5store

#define mi_int5store (   T,
 
)
Value:
{ \
const ulong def_temp = (ulong)(A), def_temp2 = (ulong)((A) >> 32); \
((uchar *)(T))[4] = (uchar)(def_temp); \
((uchar *)(T))[3] = (uchar)(def_temp >> 8); \
((uchar *)(T))[2] = (uchar)(def_temp >> 16); \
((uchar *)(T))[1] = (uchar)(def_temp >> 24); \
((uchar *)(T))[0] = (uchar)(def_temp2); \
}

◆ mi_int6store

#define mi_int6store (   T,
 
)
Value:
{ \
const ulong def_temp = (ulong)(A), def_temp2 = (ulong)((A) >> 32); \
((uchar *)(T))[5] = (uchar)(def_temp); \
((uchar *)(T))[4] = (uchar)(def_temp >> 8); \
((uchar *)(T))[3] = (uchar)(def_temp >> 16); \
((uchar *)(T))[2] = (uchar)(def_temp >> 24); \
((uchar *)(T))[1] = (uchar)(def_temp2); \
((uchar *)(T))[0] = (uchar)(def_temp2 >> 8); \
}

◆ mi_int7store

#define mi_int7store (   T,
 
)
Value:
{ \
const ulong def_temp = (ulong)(A), def_temp2 = (ulong)((A) >> 32); \
((uchar *)(T))[6] = (uchar)(def_temp); \
((uchar *)(T))[5] = (uchar)(def_temp >> 8); \
((uchar *)(T))[4] = (uchar)(def_temp >> 16); \
((uchar *)(T))[3] = (uchar)(def_temp >> 24); \
((uchar *)(T))[2] = (uchar)(def_temp2); \
((uchar *)(T))[1] = (uchar)(def_temp2 >> 8); \
((uchar *)(T))[0] = (uchar)(def_temp2 >> 16); \
}

◆ mi_int8store

#define mi_int8store (   T,
 
)
Value:
{ \
const ulong def_temp3 = (ulong)(A), def_temp4 = (ulong)((A) >> 32); \
mi_int4store((uchar *)(T) + 0, def_temp4); \
mi_int4store((uchar *)(T) + 4, def_temp3); \
}

◆ mi_rowkorr

#define mi_rowkorr (   T)    mi_uint8korr(T)

◆ mi_rowstore

#define mi_rowstore (   T,
 
)    mi_int8store(T, A)

◆ mi_sizekorr

#define mi_sizekorr (   T)    mi_uint8korr(T)

◆ mi_sizestore

#define mi_sizestore (   T,
 
)    mi_int8store(T, A)

Function Documentation

◆ mi_float4get()

static float mi_float4get ( const uchar M)
inlinestatic

◆ mi_float8get()

static double mi_float8get ( const uchar M)
inlinestatic

◆ mi_sint1korr()

static int8 mi_sint1korr ( const uchar A)
inlinestatic

◆ mi_sint2korr()

static int16 mi_sint2korr ( const uchar A)
inlinestatic

◆ mi_sint3korr()

static int32 mi_sint3korr ( const uchar A)
inlinestatic

◆ mi_sint4korr()

static int32 mi_sint4korr ( const uchar A)
inlinestatic

◆ mi_sint8korr()

static longlong mi_sint8korr ( const uchar A)
inlinestatic

◆ mi_uint1korr()

static uint8 mi_uint1korr ( const uchar A)
inlinestatic

◆ mi_uint2korr()

static uint16 mi_uint2korr ( const uchar A)
inlinestatic

◆ mi_uint3korr()

static uint32 mi_uint3korr ( const uchar A)
inlinestatic

◆ mi_uint4korr()

static uint32 mi_uint4korr ( const uchar A)
inlinestatic

◆ mi_uint5korr()

static ulonglong mi_uint5korr ( const uchar A)
inlinestatic

◆ mi_uint6korr()

static ulonglong mi_uint6korr ( const uchar A)
inlinestatic

◆ mi_uint7korr()

static ulonglong mi_uint7korr ( const uchar A)
inlinestatic

◆ mi_uint8korr()

static ulonglong mi_uint8korr ( const uchar A)
inlinestatic