summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <holyfoot@hf-ibm.(none)>2005-05-05 20:06:49 +0500
committerunknown <holyfoot@hf-ibm.(none)>2005-05-05 20:06:49 +0500
commit6de14a23f7de447e4e6c4b82e2be032b05214c9a (patch)
tree28239d480c5b5f518077513738c6718aafd3584d /sql/sql_select.cc
parentc0f355762547c01192478b60659038b7751a1ced (diff)
downloadmariadb-git-6de14a23f7de447e4e6c4b82e2be032b05214c9a.tar.gz
A lot of fixes to Precision math
Mostly about precision/decimals of the results of the operations include/decimal.h: decimal interface changed a little sql/field.cc: a lot of precision/decimals related changes to the Field_new_decimal sql/field.h: Field_new_decimal interface changed sql/ha_ndbcluster.cc: f->precision should be used here sql/item.cc: precision/decimals counting related changes sql/item.h: precision/decimals counting related changes sql/item_cmpfunc.cc: precision/decimals counting related changes sql/item_cmpfunc.h: precision/decimals counting related changes sql/item_func.cc: precision/decimals counting related changes sql/item_func.h: precision/decimals counting related changes sql/item_sum.cc: precision/decimals counting related changes sql/item_sum.h: precision/decimals counting related changes sql/my_decimal.cc: precision/decimals counting related changes sql/my_decimal.h: precision/decimals counting related changes sql/mysqld.cc: precision/decimals counting related changes sql/set_var.cc: precision/decimals counting related changes sql/sp_head.cc: dbug_decimal_print was replaced with dbug_decimal_as_string sql/sql_class.h: div_precincrement variable added sql/sql_parse.cc: precision/decimals counting related changes sql/sql_select.cc: precision/decimals counting related changes sql/sql_show.cc: Field::representation_length was removed strings/decimal.c: decimal_actual_fraction was introduced BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 32624bb3305..7fe966c7542 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -7781,9 +7781,8 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
new_field= item->make_string_field(table);
break;
case DECIMAL_RESULT:
- new_field= new Field_new_decimal(item->max_length - (item->decimals?1:0),
- maybe_null,
- item->name, table, item->decimals);
+ new_field= new Field_new_decimal(item->max_length, maybe_null, item->name,
+ table, item->decimals, item->unsigned_flag);
break;
case ROW_RESULT:
default: