diff options
author | unknown <sanja@montyprogram.com> | 2012-09-28 14:01:17 +0300 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2012-09-28 14:01:17 +0300 |
commit | 7327cd9717f0b98499f0f5b19c84e5e3e48241df (patch) | |
tree | f652710ef9b4e4f9709728f1bca3b01ee52fdfc9 /sql/sql_string.cc | |
parent | 4db207d56da2f832d8bc6cc1d935a17efcbc1035 (diff) | |
download | mariadb-git-7327cd9717f0b98499f0f5b19c84e5e3e48241df.tar.gz |
MDEV-377 Name support for dynamic columns
MDEV-127 Optimization of memory allocation
MDEV-483 Make column_check function which cheŃks dynamic columns integrit
JSON conversion function
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r-- | sql/sql_string.cc | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc index c4f5f315b08..bfd0d82c40a 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -750,79 +750,6 @@ String *copy_if_not_alloced(String *to,String *from,uint32 from_length) Help functions ****************************************************************************/ -/* - copy a string from one character set to another - - SYNOPSIS - copy_and_convert() - to Store result here - to_cs Character set of result string - from Copy from here - from_length Length of from string - from_cs From character set - - NOTES - 'to' must be big enough as form_length * to_cs->mbmaxlen - - RETURN - length of bytes copied to 'to' -*/ - - -static uint32 -copy_and_convert_extended(char *to, uint32 to_length, CHARSET_INFO *to_cs, - const char *from, uint32 from_length, - CHARSET_INFO *from_cs, - uint *errors) -{ - int cnvres; - my_wc_t wc; - const uchar *from_end= (const uchar*) from+from_length; - char *to_start= to; - uchar *to_end= (uchar*) to+to_length; - my_charset_conv_mb_wc mb_wc= from_cs->cset->mb_wc; - my_charset_conv_wc_mb wc_mb= to_cs->cset->wc_mb; - uint error_count= 0; - - while (1) - { - if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, - from_end)) > 0) - from+= cnvres; - else if (cnvres == MY_CS_ILSEQ) - { - error_count++; - from++; - wc= '?'; - } - else if (cnvres > MY_CS_TOOSMALL) - { - /* - A correct multibyte sequence detected - But it doesn't have Unicode mapping. - */ - error_count++; - from+= (-cnvres); - wc= '?'; - } - else - break; // Not enough characters - -outp: - if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0) - to+= cnvres; - else if (cnvres == MY_CS_ILUNI && wc != '?') - { - error_count++; - wc= '?'; - goto outp; - } - else - break; - } - *errors= error_count; - return (uint32) (to - to_start); -} /* |