diff options
author | Joerg Bruehe <joerg.bruehe@oracle.com> | 2012-05-07 22:20:42 +0200 |
---|---|---|
committer | Joerg Bruehe <joerg.bruehe@oracle.com> | 2012-05-07 22:20:42 +0200 |
commit | ad1e123f478e170cdbed5fd0e6a58277e61326ad (patch) | |
tree | fd4bc4e87a0385cd676cd34fe9ba93dd57358f2e /sql/field_conv.cc | |
parent | 066dc9a281ee8932827f7e6180dd0fa1bfe5d922 (diff) | |
parent | 582b7283472a43af5d7fb51386df055ea9d44a96 (diff) | |
download | mariadb-git-ad1e123f478e170cdbed5fd0e6a58277e61326ad.tar.gz |
Merge 5.5.24 back into main 5.5.
This is a weave merge, but without any conflicts.
In 14 source files, the copyright year needed to be updated to 2012.
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r-- | sql/field_conv.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 594449174bc..17b0d34557a 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -317,10 +317,11 @@ 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),copy->tmp.charset()); - copy->from_field->val_str(©->tmp); - copy->to_field->store(copy->tmp.c_ptr_quick(),copy->tmp.length(), - copy->tmp.charset()); + String res(buff, sizeof(buff), copy->from_field->charset()); + res.length(0U); + + copy->from_field->val_str(&res); + copy->to_field->store(res.c_ptr_quick(), res.length(), res.charset()); } @@ -563,7 +564,7 @@ void Copy_field::set(uchar *to,Field *from) /* To do: - If 'save\ is set to true and the 'from' is a blob field, do_copy is set to + If 'save' is set to true and the 'from' is a blob field, do_copy is set to do_save_blob rather than do_conv_blob. The only differences between them appears to be: |