diff options
author | bar@gw.udmsearch.izhnet.ru <> | 2002-06-20 23:26:04 +0500 |
---|---|---|
committer | bar@gw.udmsearch.izhnet.ru <> | 2002-06-20 23:26:04 +0500 |
commit | c5b8f48cf5acecb4f50155a98bf83f4eefd53484 (patch) | |
tree | f3e438ef440a2d995fd77188aaeab86b3dbc23da /sql/item_strfunc.cc | |
parent | 44347c5a541c97b88b40a2a7698e33281ebcf951 (diff) | |
download | mariadb-git-c5b8f48cf5acecb4f50155a98bf83f4eefd53484.tar.gz |
New CHARSET() function
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 81d866bfe6d..a4f09f9103e 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1911,12 +1911,25 @@ outp: return str; } +String *Item_func_charset::val_str(String *str) +{ + String *res = args[0]->val_str(str); + + if ((null_value=(args[0]->null_value || !res->charset()))) + return 0; + str->copy(res->charset()->name,strlen(res->charset()->name)); + return str; +} + + void Item_func_conv_charset3::fix_length_and_dec() { /* BAR TODO: What to do here??? */ } + + String *Item_func_hex::val_str(String *str) { if (args[0]->result_type() != STRING_RESULT) |