This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| class | String |
Defines | |
| #define | NOT_FIXED_DEC 31 |
Functions | |
| int | sortcmp (const String *a, const String *b, CHARSET_INFO *cs) |
| String * | copy_if_not_alloced (String *a, String *b, uint32 arg_length) |
| uint32 | copy_and_convert (char *to, uint32 to_length, CHARSET_INFO *to_cs, const char *from, uint32 from_length, CHARSET_INFO *from_cs, uint *errors) |
| #define NOT_FIXED_DEC 31 |
Definition at line 24 of file sql_string.h.
| uint32 copy_and_convert | ( | char * | to, | |
| uint32 | to_length, | |||
| CHARSET_INFO * | to_cs, | |||
| const char * | from, | |||
| uint32 | from_length, | |||
| CHARSET_INFO * | from_cs, | |||
| uint * | errors | |||
| ) |
Definition at line 796 of file sql_string.cc.
References charset_info_st::cset, e, int(), my_charset_handler_st::mb_wc, MY_CS_ILSEQ, MY_CS_ILUNI, MY_CS_TOOSMALL, my_wc_t, and my_charset_handler_st::wc_mb.
00799 { 00800 int cnvres; 00801 my_wc_t wc; 00802 const uchar *from_end= (const uchar*) from+from_length; 00803 char *to_start= to; 00804 uchar *to_end= (uchar*) to+to_length; 00805 int (*mb_wc)(struct charset_info_st *, my_wc_t *, const uchar *, 00806 const uchar *) = from_cs->cset->mb_wc; 00807 int (*wc_mb)(struct charset_info_st *, my_wc_t, uchar *s, uchar *e)= 00808 to_cs->cset->wc_mb; 00809 uint error_count= 0; 00810 00811 while (1) 00812 { 00813 if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, 00814 from_end)) > 0) 00815 from+= cnvres; 00816 else if (cnvres == MY_CS_ILSEQ) 00817 { 00818 error_count++; 00819 from++; 00820 wc= '?'; 00821 } 00822 else 00823 break; // Impossible char. 00824 00825 outp: 00826 if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0) 00827 to+= cnvres; 00828 else if (cnvres == MY_CS_ILUNI && wc != '?') 00829 { 00830 error_count++; 00831 wc= '?'; 00832 goto outp; 00833 } 00834 else 00835 break; 00836 } 00837 *errors= error_count; 00838 return (uint32) (to - to_start); 00839 }
Here is the call graph for this function:

Definition at line 754 of file sql_string.cc.
References from, memcpy, min, and to.
00755 { 00756 if (from->Alloced_length >= from_length) 00757 return from; 00758 if (from->alloced || !to || from == to) 00759 { 00760 (void) from->realloc(from_length); 00761 return from; 00762 } 00763 if (to->realloc(from_length)) 00764 return from; // Actually an error 00765 if ((to->str_length=min(from->str_length,from_length))) 00766 memcpy(to->Ptr,from->Ptr,to->str_length); 00767 to->str_charset=from->str_charset; 00768 return to; 00769 }
| int sortcmp | ( | const String * | a, | |
| const String * | b, | |||
| CHARSET_INFO * | cs | |||
| ) |
Definition at line 720 of file sql_string.cc.
References charset_info_st::coll, String::length(), String::ptr(), and my_collation_handler_st::strnncollsp.
00721 { 00722 return cs->coll->strnncollsp(cs, 00723 (unsigned char *) s->ptr(),s->length(), 00724 (unsigned char *) t->ptr(),t->length(), 0); 00725 }
Here is the call graph for this function:

1.4.7

