item_strfunc.cc File Reference

#include "mysql_priv.h"
#include "sql_acl.h"
#include <m_ctype.h>
#include "md5.h"
#include "sha1.h"
#include "my_aes.h"
#include "../mysys/my_static.h"
#include <my_dir.h>

Include dependency graph for item_strfunc.cc:

Include dependency graph

Defines

#define bin_to_ascii(c)   ((c)>=38?((c)-38+'a'):(c)>=12?((c)-12+'A'):(c)+'.')
#define get_esc_bit(mask, num)   (1 & (*((mask) + ((num) >> 3))) >> ((num) & 7))
#define UUID_TIME_OFFSET   ((ulonglong) 141427 * 24 * 60 * 60 * 1000 * 10 )
#define UUID_VERSION   0x1000
#define UUID_VARIANT   0x8000

Functions

C_MODE_START C_MODE_END String my_empty_string ("", default_charset_info)
void my_coll_agg_error (DTCollation &c1, DTCollation &c2, const char *fname)
uint nr_of_decimals (const char *str)
char get_scode (CHARSET_INFO *cs, char *ptr)
Stringalloc_buffer (String *res, String *str, String *tmp_value, ulong length)
int hexchar_to_int (char c)
void tohex (char *to, uint from, uint len)
void set_clock_seq_str ()

Variables

rand_struct uuid_rand
uint nanoseq
ulonglong uuid_time = 0
char clock_seq_and_node_str [] = "-0000-000000000000"

Define Documentation

#define bin_to_ascii  )     ((c)>=38?((c)-38+'a'):(c)>=12?((c)-12+'A'):(c)+'.')
 

#define get_esc_bit mask,
num   )     (1 & (*((mask) + ((num) >> 3))) >> ((num) & 7))
 

#define UUID_TIME_OFFSET   ((ulonglong) 141427 * 24 * 60 * 60 * 1000 * 10 )
 

#define UUID_VARIANT   0x8000
 

#define UUID_VERSION   0x1000
 


Function Documentation

String* alloc_buffer String res,
String str,
String tmp_value,
ulong  length
[inline]
 

01883 {
01884   if (res->alloced_length() < length)
01885   {
01886     if (str->alloced_length() >= length)
01887     {
01888       (void) str->copy(*res);
01889       str->length(length);
01890       return str;
01891     }
01892     if (tmp_value->alloc(length))
01893       return 0;
01894     (void) tmp_value->copy(*res);
01895     tmp_value->length(length);
01896     return tmp_value;
01897   }
01898   res->length(length);
01899   return res;
01900 }

char get_scode CHARSET_INFO cs,
char *  ptr
[static]
 

01557 {
01558   uchar ch=my_toupper(cs,*ptr);
01559   if (ch < 'A' || ch > 'Z')
01560   {
01561                                         // Thread extended alfa (country spec)
01562     return '0';                         // as vokal
01563   }
01564   return(soundex_map[ch-'A']);
01565 }

int hexchar_to_int char  c  )  [inline]
 

02336 {
02337   if (c <= '9' && c >= '0')
02338     return c-'0';
02339   c|=32;
02340   if (c <= 'f' && c >= 'a')
02341     return c-'a'+10;
02342   return -1;
02343 }

void my_coll_agg_error DTCollation c1,
DTCollation c2,
const char *  fname
[static]
 

00044 {
00045   my_error(ER_CANT_AGGREGATE_2COLLATIONS, MYF(0),
00046            c1.collation->name, c1.derivation_name(),
00047            c2.collation->name, c2.derivation_name(),
00048            fname);
00049 }

C_MODE_START C_MODE_END String my_empty_string ""  ,
default_charset_info 
 

uint nr_of_decimals const char *  str  ) 
 

00052 {
00053   if ((str=strchr(str,'.')))
00054   {
00055     const char *start= ++str;
00056     for (; my_isdigit(system_charset_info,*str) ; str++) ;
00057     return (uint) (str-start);
00058   }
00059   return 0;
00060 }

void set_clock_seq_str  )  [static]
 

02842 {
02843   uint16 clock_seq= ((uint)(my_rnd(&uuid_rand)*16383)) | UUID_VARIANT;
02844   tohex(clock_seq_and_node_str+1, clock_seq, 4);
02845   nanoseq= 0;
02846 }

void tohex char *  to,
uint  from,
uint  len
[static]
 

02832 {
02833   to+= len;
02834   while (len--)
02835   {
02836     *--to= _dig_vec_lower[from & 15];
02837     from >>= 4;
02838   }
02839 }


Variable Documentation

char clock_seq_and_node_str[] = "-0000-000000000000" [static]
 

uint nanoseq [static]
 

struct rand_struct uuid_rand [static]
 

ulonglong uuid_time = 0 [static]
 


Generated on Thu Feb 24 10:43:51 2005 for MySQL by  doxygen 1.3.9.1