#include "mysql_priv.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:

Go to the source code of this file.
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) |
| static void | my_coll_agg_error (DTCollation &c1, DTCollation &c2, const char *fname) |
| static char | soundex_toupper (char ch) |
| static char | get_scode (char *ptr) |
| String * | alloc_buffer (String *res, String *str, String *tmp_value, ulong length) |
| static void | tohex (char *to, uint from, uint len) |
| static void | set_clock_seq_str () |
Variables | |
| static struct rand_struct | uuid_rand |
| static uint | nanoseq |
| static ulonglong | uuid_time = 0 |
| static char | clock_seq_and_node_str [] = "-0000-000000000000" |
| #define bin_to_ascii | ( | c | ) | ((c)>=38?((c)-38+'a'):(c)>=12?((c)-12+'A'):(c)+'.') |
| #define UUID_TIME_OFFSET ((ulonglong) 141427 * 24 * 60 * 60 * 1000 * 10 ) |
| #define UUID_VARIANT 0x8000 |
| #define UUID_VERSION 0x1000 |
Definition at line 2094 of file item_strfunc.cc.
References String::alloc(), String::alloced_length(), String::copy(), and String::length().
Referenced by Item_func_rpad::val_str(), and Item_func_repeat::val_str().
02096 { 02097 if (res->alloced_length() < length) 02098 { 02099 if (str->alloced_length() >= length) 02100 { 02101 (void) str->copy(*res); 02102 str->length(length); 02103 return str; 02104 } 02105 if (tmp_value->alloc(length)) 02106 return 0; 02107 (void) tmp_value->copy(*res); 02108 tmp_value->length(length); 02109 return tmp_value; 02110 } 02111 res->length(length); 02112 return res; 02113 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static char get_scode | ( | char * | ptr | ) | [static] |
Definition at line 1760 of file item_strfunc.cc.
References soundex_map, and soundex_toupper().
01761 { 01762 uchar ch= soundex_toupper(*ptr); 01763 if (ch < 'A' || ch > 'Z') 01764 { 01765 // Thread extended alfa (country spec) 01766 return '0'; // as vokal 01767 } 01768 return(soundex_map[ch-'A']); 01769 }
Here is the call graph for this function:

| static void my_coll_agg_error | ( | DTCollation & | c1, | |
| DTCollation & | c2, | |||
| const char * | fname | |||
| ) | [static] |
Definition at line 41 of file item_strfunc.cc.
References DTCollation::collation, DTCollation::derivation_name(), ER_CANT_AGGREGATE_2COLLATIONS, my_error(), MYF, and charset_info_st::name.
00043 { 00044 my_error(ER_CANT_AGGREGATE_2COLLATIONS, MYF(0), 00045 c1.collation->name, c1.derivation_name(), 00046 c2.collation->name, c2.derivation_name(), 00047 fname); 00048 }
Here is the call graph for this function:

| C_MODE_START C_MODE_END String my_empty_string | ( | "" | , | |
| default_charset_info | ||||
| ) |
Referenced by sys_var_thd_date_time_format::check(), Item_func_hex::val_str(), Item_func_conv::val_str(), Item_func_repeat::val_str(), Item_func_make_set::val_str(), Item_func_soundex::val_str(), Item_func_encrypt::val_str(), Item_func_old_password::val_str(), Item_func_password::val_str(), Item_func_substr_index::val_str(), Item_func_substr::val_str(), Item_func_right::val_str(), Item_func_left::val_str(), Item_func_reverse::val_str(), Item_func_concat_ws::val_str(), and Item_func_des_encrypt::val_str().
Here is the caller graph for this function:

| static void set_clock_seq_str | ( | ) | [static] |
Definition at line 3057 of file item_strfunc.cc.
References my_rnd(), tohex(), uuid_rand, and UUID_VARIANT.
Referenced by Item_func_uuid::val_str().
03058 { 03059 uint16 clock_seq= ((uint)(my_rnd(&uuid_rand)*16383)) | UUID_VARIANT; 03060 tohex(clock_seq_and_node_str+1, clock_seq, 4); 03061 nanoseq= 0; 03062 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static char soundex_toupper | ( | char | ch | ) | [static] |
Definition at line 1755 of file item_strfunc.cc.
Referenced by get_scode(), and Item_func_soundex::val_str().
Here is the caller graph for this function:

Definition at line 3047 of file item_strfunc.cc.
References _dig_vec_lower.
Referenced by set_clock_seq_str(), and Item_func_uuid::val_str().
03048 { 03049 to+= len; 03050 while (len--) 03051 { 03052 *--to= _dig_vec_lower[from & 15]; 03053 from >>= 4; 03054 } 03055 }
Here is the caller graph for this function:

char clock_seq_and_node_str[] = "-0000-000000000000" [static] |
Definition at line 3038 of file item_strfunc.cc.
Definition at line 3036 of file item_strfunc.cc.
struct rand_struct uuid_rand [static] |
Definition at line 3035 of file item_strfunc.cc.
Referenced by set_clock_seq_str(), and Item_func_uuid::val_str().
Definition at line 3037 of file item_strfunc.cc.
1.4.7

