diff options
author | unknown <serg@serg.mylan> | 2004-07-07 23:51:25 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-07-07 23:51:25 +0200 |
commit | bfaab0fbfaa9c12d45fa927352aaf604dd4feb17 (patch) | |
tree | 5e86b71d1f883acead0ab09f6c6d3363596c5eb8 /sql | |
parent | 5ef15478cdbaa65c7d037ce5662117b8ed425dba (diff) | |
parent | 11300725dfaf9603b34dc01e05c8e316112a42a1 (diff) | |
download | mariadb-git-bfaab0fbfaa9c12d45fa927352aaf604dd4feb17.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_strfunc.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index b0c685c1c46..b5b08a04f88 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2298,15 +2298,18 @@ String *Item_func_unhex::val_str(String *str) { DBUG_ASSERT(fixed == 1); /* Convert given hex string to a binary string */ + String *res= args[0]->val_str(str); - const char *from=res->ptr(), *end; - char *to; - int r; if (!res || tmp_value.alloc((1+res->length())/2)) { null_value=1; return 0; } + + const char *from=res->ptr(), *end; + char *to; + int r; + null_value=0; tmp_value.length((1+res->length())/2); to= (char*) tmp_value.ptr(); |