MySQL 8.0.37
Source Code Documentation
pack.cc File Reference
#include <sys/types.h>
#include "my_byteorder.h"
#include "my_compiler.h"
#include "my_inttypes.h"
#include "mysql.h"
#include "mysql_com.h"

Functions

ulong STDCALL net_field_length (uchar **packet)
 
ulong STDCALL net_field_length_checked (uchar **packet, ulong max_length)
 
uint64_t net_field_length_ll (uchar **packet)
 
ucharnet_store_length (uchar *packet, ulonglong length)
 
uint net_length_size (ulonglong num)
 The length of space required to store the resulting length-encoded integer for the given number. More...
 
uint net_field_length_size (const uchar *pos)
 length of buffer required to represent a length-encoded string give the length part of length encoded string. More...
 

Function Documentation

◆ net_field_length()

ulong STDCALL net_field_length ( uchar **  packet)

◆ net_field_length_checked()

ulong STDCALL net_field_length_checked ( uchar **  packet,
ulong  max_length 
)

◆ net_field_length_ll()

uint64_t net_field_length_ll ( uchar **  packet)
inline

◆ net_field_length_size()

uint net_field_length_size ( const uchar pos)

length of buffer required to represent a length-encoded string give the length part of length encoded string.

This function can be used before calling net_field_lenth/net_field_length_ll.

Parameters
[in]posLength information of length-encoded string
Returns
length of buffer needed to store this number [1, 3, 4, 9].

◆ net_length_size()

uint net_length_size ( ulonglong  num)

The length of space required to store the resulting length-encoded integer for the given number.

This function can be used at places where one needs to dynamically allocate the buffer for a given number to be stored as length- encoded integer.

Parameters
[in]numthe input number
Returns
length of buffer needed to store this number [1, 3, 4, 9].

◆ net_store_length()

uchar * net_store_length ( uchar packet,
ulonglong  length 
)