#include <my_global.h>#include <mysql_com.h>#include <mysql.h>Include dependency graph for pack.c:

Go to the source code of this file.
Functions | |
| ulong STDCALL | net_field_length (uchar **packet) |
| my_ulonglong | net_field_length_ll (uchar **packet) |
| char * | net_store_length (char *pkg, ulonglong length) |
Definition at line 22 of file pack.c.
References NULL_LENGTH, pos(), reg1, uint2korr, uint3korr, and uint4korr.
00023 { 00024 reg1 uchar *pos= (uchar *)*packet; 00025 if (*pos < 251) 00026 { 00027 (*packet)++; 00028 return (ulong) *pos; 00029 } 00030 if (*pos == 251) 00031 { 00032 (*packet)++; 00033 return NULL_LENGTH; 00034 } 00035 if (*pos == 252) 00036 { 00037 (*packet)+=3; 00038 return (ulong) uint2korr(pos+1); 00039 } 00040 if (*pos == 253) 00041 { 00042 (*packet)+=4; 00043 return (ulong) uint3korr(pos+1); 00044 } 00045 (*packet)+=9; /* Must be 254 when here */ 00046 return (ulong) uint4korr(pos+1); 00047 }
Here is the call graph for this function:

| my_ulonglong net_field_length_ll | ( | uchar ** | packet | ) |
Definition at line 50 of file pack.c.
References NULL_LENGTH, pos(), reg1, uint2korr, uint3korr, uint4korr, and uint8korr.
00051 { 00052 reg1 uchar *pos= *packet; 00053 if (*pos < 251) 00054 { 00055 (*packet)++; 00056 return (my_ulonglong) *pos; 00057 } 00058 if (*pos == 251) 00059 { 00060 (*packet)++; 00061 return (my_ulonglong) NULL_LENGTH; 00062 } 00063 if (*pos == 252) 00064 { 00065 (*packet)+=3; 00066 return (my_ulonglong) uint2korr(pos+1); 00067 } 00068 if (*pos == 253) 00069 { 00070 (*packet)+=4; 00071 return (my_ulonglong) uint3korr(pos+1); 00072 } 00073 (*packet)+=9; /* Must be 254 when here */ 00074 #ifdef NO_CLIENT_LONGLONG 00075 return (my_ulonglong) uint4korr(pos+1); 00076 #else 00077 return (my_ulonglong) uint8korr(pos+1); 00078 #endif 00079 }
Here is the call graph for this function:

| char* net_store_length | ( | char * | pkg, | |
| ulonglong | length | |||
| ) |
Definition at line 99 of file pack.c.
References int2store, int3store, int8store, and LL.
00100 { 00101 uchar *packet=(uchar*) pkg; 00102 if (length < (ulonglong) LL(251)) 00103 { 00104 *packet=(uchar) length; 00105 return (char*) packet+1; 00106 } 00107 /* 251 is reserved for NULL */ 00108 if (length < (ulonglong) LL(65536)) 00109 { 00110 *packet++=252; 00111 int2store(packet,(uint) length); 00112 return (char*) packet+2; 00113 } 00114 if (length < (ulonglong) LL(16777216)) 00115 { 00116 *packet++=253; 00117 int3store(packet,(ulong) length); 00118 return (char*) packet+3; 00119 } 00120 *packet++=254; 00121 int8store(packet,length); 00122 return (char*) packet+8; 00123 }
1.4.7

