diff options
author | unknown <bar@bar.mysql.r18.ru> | 2002-12-19 09:38:29 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2002-12-19 09:38:29 +0400 |
commit | 52ed8cb8cbf0ca6966aeb56f0b1ec8d1ecf5bd93 (patch) | |
tree | d0aec1a4fd431a5751be4d2f1990a3e35606aedc /sql/field_conv.cc | |
parent | b29cc128bfb15a4a81eda0031b0f2e74c862d250 (diff) | |
download | mariadb-git-52ed8cb8cbf0ca6966aeb56f0b1ec8d1ecf5bd93.tar.gz |
removed several cases of default_charset_info use
a bit more ucs2 compatibility
sql/des_key_file.cc:
use latin1
sql/field.cc:
use latin1
sql/field_conv.cc:
removed default_charset_info
sql/hostname.cc:
removed default_charset_info
sql/item_timefunc.cc:
gets closer to ucs2 compatibility
sql/log_event.cc:
removed default_charset_info
sql/set_var.h:
removed default_charset_info
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r-- | sql/field_conv.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 0a8c122812c..95d06176cd2 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -272,7 +272,7 @@ static void do_conv_blob(Copy_field *copy) static void do_save_blob(Copy_field *copy) { char buff[MAX_FIELD_WIDTH]; - String res(buff,sizeof(buff),default_charset_info); + String res(buff,sizeof(buff),copy->tmp.charset()); copy->from_field->val_str(&res,&res); copy->tmp.copy(res); ((Field_blob *) copy->to_field)->store(copy->tmp.ptr(), @@ -284,7 +284,7 @@ static void do_save_blob(Copy_field *copy) static void do_field_string(Copy_field *copy) { char buff[MAX_FIELD_WIDTH]; - copy->tmp.set_quick(buff,sizeof(buff),default_charset_info); + copy->tmp.set_quick(buff,sizeof(buff),copy->tmp.charset()); copy->from_field->val_str(©->tmp,©->tmp); copy->to_field->store(copy->tmp.c_ptr_quick(),copy->tmp.length(),copy->tmp.charset()); } @@ -313,7 +313,7 @@ static void do_cut_string(Copy_field *copy) ptr != end ; ptr++) { - if (!my_isspace(system_charset_info, *ptr)) + if (!my_isspace(system_charset_info, *ptr)) // QQ: ucs incompatible { current_thd->cuted_fields++; // Give a warning break; @@ -555,7 +555,7 @@ void field_conv(Field *to,Field *from) to->type() == FIELD_TYPE_DECIMAL) { char buff[MAX_FIELD_WIDTH]; - String result(buff,sizeof(buff),default_charset_info); + String result(buff,sizeof(buff),from->charset()); from->val_str(&result,&result); to->store(result.c_ptr_quick(),result.length(),to->charset()); // QQ: what to do if "from" and "to" are of dirrent charsets? |