summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
authorunknown <ramil/ram@ramil.myoffice.izhnet.ru>2007-03-15 13:08:24 +0400
committerunknown <ramil/ram@ramil.myoffice.izhnet.ru>2007-03-15 13:08:24 +0400
commitfdb2e640321af399b5b95145d192c91fbb387f89 (patch)
treed171bea418e7f70f95f672eabd6b828302006d27 /sql/field_conv.cc
parent0b9d0fef999e91dd96938b2bdaa0a48de3850d5f (diff)
parent9e5691cb331b98188ab3ffc324f9c3e3fa87cb0c (diff)
downloadmariadb-git-fdb2e640321af399b5b95145d192c91fbb387f89.tar.gz
Merge mysql.com:/home/ram/work/b24558/b24558.5.0
into mysql.com:/home/ram/work/b24558/b24558.5.1 sql/field_conv.cc: Auto merged mysql-test/r/type_newdecimal.result: merging mysql-test/t/type_newdecimal.test: merging
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r--sql/field_conv.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 805aba01754..88d36615668 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -336,6 +336,13 @@ static void do_field_real(Copy_field *copy)
}
+static void do_field_decimal(Copy_field *copy)
+{
+ my_decimal value;
+ copy->to_field->store_decimal(copy->from_field->val_decimal(&value));
+}
+
+
/*
string copy for single byte characters set when to string is shorter than
from string
@@ -580,6 +587,8 @@ void (*Copy_field::get_copy_func(Field *to,Field *from))(Copy_field*)
if (to->real_type() == MYSQL_TYPE_BIT ||
from->real_type() == MYSQL_TYPE_BIT)
return do_field_int;
+ if (to->result_type() == DECIMAL_RESULT)
+ return do_field_decimal;
// Check if identical fields
if (from->result_type() == STRING_RESULT)
{