summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
authoranozdrin@mysql.com <>2006-05-10 23:16:30 +0400
committeranozdrin@mysql.com <>2006-05-10 23:16:30 +0400
commit65b87b86a39d62ae781475d596dfabc379543cbb (patch)
treeeee71724a8803bced338d450083b960c7efcab22 /sql/field_conv.cc
parent247be7d4a922c008b8810be923165c3170804413 (diff)
downloadmariadb-git-65b87b86a39d62ae781475d596dfabc379543cbb.tar.gz
Fix for BUG#18587: Function that accepts and returns TEXT
garbles data if longer than 766 chars. The problem is that a stored routine returns BLOBs to the previous caller, BLOBs are shallow-copied (i.e. only pointers to the data are copied). The fix is to also copy data of BLOBs.
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r--sql/field_conv.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 895f022624c..4e977c06180 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -642,7 +642,8 @@ void (*Copy_field::get_copy_func(Field *to,Field *from))(Copy_field*)
void field_conv(Field *to,Field *from)
{
- if (to->real_type() == from->real_type())
+ if (to->real_type() == from->real_type() &&
+ !(to->type() == FIELD_TYPE_BLOB && to->table->copy_blobs))
{
if (to->pack_length() == from->pack_length() &&
!(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) &&