MySQL 9.0.0
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...
 
uint64_t net_length_size_including_self (uint64_t length)
 Calculates length of the field in case value of this field includes length of this field (self) 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)

◆ 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_length_size_including_self()

uint64_t net_length_size_including_self ( uint64_t  length)

Calculates length of the field in case value of this field includes length of this field (self)

Parameters
lengthSize of the field without self
Returns
Size of the field including self

◆ net_store_length()

uchar * net_store_length ( uchar packet,
ulonglong  length 
)