summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
authorJoerg Bruehe <joerg.bruehe@oracle.com>2012-05-07 22:20:42 +0200
committerJoerg Bruehe <joerg.bruehe@oracle.com>2012-05-07 22:20:42 +0200
commit5be07ceaddcae282a1c41b62fb3222715c773577 (patch)
treefd4bc4e87a0385cd676cd34fe9ba93dd57358f2e /sql/field_conv.cc
parent1d47bbe3bf80f5fbd2770d56c97f788f8401ffa0 (diff)
parent83d455be90a06e8fc1293a611061bd9529ed8536 (diff)
downloadmariadb-git-5be07ceaddcae282a1c41b62fb3222715c773577.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.cc13
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(&copy->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: