diff options
author | Michael Widenius <monty@askmonty.org> | 2011-02-20 18:51:43 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-02-20 18:51:43 +0200 |
commit | 58bb0769bdf13a9747e900aa2f0955137738ce9d (patch) | |
tree | 1b46ea0f72dce27532f0c87c60ba8a1baa453fa0 /sql/item_timefunc.cc | |
parent | 7e497abcfb3e761ba5a368316192ae930fb58f6b (diff) | |
parent | de3c4428b8c759e85631d8d70b5845c872de5400 (diff) | |
download | mariadb-git-58bb0769bdf13a9747e900aa2f0955137738ce9d.tar.gz |
Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria
Now need to merge with latest xtradb before pushing
sql/ha_partition.cc:
Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
Changed to use opt_stack_trace instead of opt_pstack.
Removed references to pstack
sql/partition_element.h:
Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
Fixed wrong assert
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 443bf3faf6f..9cf56148994 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2463,14 +2463,14 @@ String *Item_char_typecast::val_str(String *str) { // Convert character set if differ uint dummy_errors; - if (!(res= args[0]->val_str(&tmp_value)) || - str->copy(res->ptr(), res->length(), from_cs, - cast_cs, &dummy_errors)) + if (!(res= args[0]->val_str(str)) || + tmp_value.copy(res->ptr(), res->length(), from_cs, + cast_cs, &dummy_errors)) { null_value= 1; return 0; } - res= str; + res= &tmp_value; } res->set_charset(cast_cs); @@ -2504,9 +2504,9 @@ String *Item_char_typecast::val_str(String *str) { if (res->alloced_length() < (uint) cast_length) { - str->alloc(cast_length); - str->copy(*res); - res= str; + str_value.alloc(cast_length); + str_value.copy(*res); + res= &str_value; } bzero((char*) res->ptr() + res->length(), (uint) cast_length - res->length()); |