diff options
author | serg@serg.mylan <> | 2004-07-07 23:51:25 +0200 |
---|---|---|
committer | serg@serg.mylan <> | 2004-07-07 23:51:25 +0200 |
commit | d0f53f7ee08fccc5810da17c108873a4c448280e (patch) | |
tree | 5e86b71d1f883acead0ab09f6c6d3363596c5eb8 /sql | |
parent | 6fdafa5635d5ad369f7a4e5272b818b9e4957a1c (diff) | |
parent | fe57b75079836a3b731b4b05ddb490872df8b3f3 (diff) | |
download | mariadb-git-d0f53f7ee08fccc5810da17c108873a4c448280e.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(); |