diff options
author | unknown <holyfoot@hf-ibm.(none)> | 2005-05-05 20:06:49 +0500 |
---|---|---|
committer | unknown <holyfoot@hf-ibm.(none)> | 2005-05-05 20:06:49 +0500 |
commit | 6de14a23f7de447e4e6c4b82e2be032b05214c9a (patch) | |
tree | 28239d480c5b5f518077513738c6718aafd3584d /sql/item_func.h | |
parent | c0f355762547c01192478b60659038b7751a1ced (diff) | |
download | mariadb-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/item_func.h')
-rw-r--r-- | sql/item_func.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 76d1151f3bf..57faa05ce23 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -267,6 +267,8 @@ public: void fix_length_and_dec() { max_length=args[0]->max_length; unsigned_flag=0; } void print(String *str); + uint decimal_precision() const { return args[0]->decimal_precision(); } + }; @@ -296,7 +298,7 @@ public: longlong val_int(); my_decimal *val_decimal(my_decimal*); enum Item_result result_type () const { return DECIMAL_RESULT; } - enum_field_types field_type() const { return MYSQL_TYPE_DECIMAL; } + enum_field_types field_type() const { return MYSQL_TYPE_NEWDECIMAL; } void fix_length_and_dec() {}; }; @@ -346,6 +348,7 @@ public: class Item_func_div :public Item_num_op { public: + uint prec_increment; Item_func_div(Item *a,Item *b) :Item_num_op(a,b) {} longlong int_op() { DBUG_ASSERT(0); return 0; } double real_op(); @@ -390,6 +393,7 @@ public: const char *func_name() const { return "-"; } void fix_length_and_dec(); void fix_num_length_and_dec(); + uint decimal_precision() const { return args[0]->decimal_precision(); } }; @@ -593,7 +597,7 @@ public: double real_op(); longlong int_op(); my_decimal *decimal_op(my_decimal *); - void fix_num_length_and_dec(); + void fix_length_and_dec(); }; |