summaryrefslogtreecommitdiff
path: root/sql/my_decimal.h
diff options
context:
space:
mode:
authorunknown <ibabaev@bk-internal.mysql.com>2007-05-28 00:05:38 +0200
committerunknown <ibabaev@bk-internal.mysql.com>2007-05-28 00:05:38 +0200
commit11dd353e12de970d93a0304ea3e6e43df1126907 (patch)
tree88e9d6e9af319de1b0c833c9bb011ed5025ac543 /sql/my_decimal.h
parent06297270880ca0f0023c66ca90291665ec3aacc2 (diff)
parent5f99cf963ea4138fd7adb70ec4a9add55388c281 (diff)
downloadmariadb-git-11dd353e12de970d93a0304ea3e6e43df1126907.tar.gz
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into bk-internal.mysql.com:/data0/bk/mysql-5.0-opt client/mysqldump.c: Auto merged mysql-test/r/mysqldump.result: Auto merged mysql-test/r/ps_2myisam.result: Auto merged mysql-test/r/ps_3innodb.result: Auto merged mysql-test/r/ps_4heap.result: Auto merged mysql-test/r/ps_5merge.result: Auto merged mysql-test/r/ps_6bdb.result: Auto merged mysql-test/r/ps_7ndb.result: Auto merged sql/field.h: Auto merged sql/item_func.cc: Auto merged sql/my_decimal.h: Auto merged sql/sql_base.cc: Auto merged
Diffstat (limited to 'sql/my_decimal.h')
-rw-r--r--sql/my_decimal.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/my_decimal.h b/sql/my_decimal.h
index 2de8b9add11..c661579ea66 100644
--- a/sql/my_decimal.h
+++ b/sql/my_decimal.h
@@ -36,13 +36,17 @@ C_MODE_END
/* maximum length of buffer in our big digits (uint32) */
#define DECIMAL_BUFF_LENGTH 9
+
+/* the number of digits that my_decimal can possibly contain */
+#define DECIMAL_MAX_POSSIBLE_PRECISION (DECIMAL_BUFF_LENGTH * 9)
+
/*
maximum guaranteed precision of number in decimal digits (number of our
digits * number of decimal digits in one our big digit - number of decimal
- digits in one our big digit decreased on 1 (because we always put decimal
+ digits in one our big digit decreased by 1 (because we always put decimal
point on the border of our big digits))
*/
-#define DECIMAL_MAX_PRECISION ((DECIMAL_BUFF_LENGTH * 9) - 8*2)
+#define DECIMAL_MAX_PRECISION (DECIMAL_MAX_POSSIBLE_PRECISION - 8*2)
#define DECIMAL_MAX_SCALE 30
#define DECIMAL_NOT_SPECIFIED 31
@@ -50,7 +54,7 @@ C_MODE_END
maximum length of string representation (number of maximum decimal
digits + 1 position for sign + 1 position for decimal point)
*/
-#define DECIMAL_MAX_STR_LENGTH (DECIMAL_MAX_PRECISION + 2)
+#define DECIMAL_MAX_STR_LENGTH (DECIMAL_MAX_POSSIBLE_PRECISION + 2)
/*
maximum size of packet length
*/