~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/my_decimal.h

  • Committer: Monty Taylor
  • Date: 2009-10-13 06:22:10 UTC
  • mfrom: (1182 staging)
  • mto: This revision was merged to the branch mainline in revision 1184.
  • Revision ID: mordred@inaugust.com-20091013062210-iwnwwcdamjdvlx1m
Merged up with build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
*/
78
78
#define DECIMAL_MAX_FIELD_SIZE DECIMAL_MAX_PRECISION
79
79
 
80
 
 
81
 
inline uint32_t my_decimal_size(uint32_t precision, uint32_t scale)
82
 
{
83
 
  /*
84
 
    Always allocate more space to allow library to put decimal point
85
 
    where it want
86
 
  */
87
 
  return decimal_size(precision, scale) + 1;
88
 
}
89
 
 
90
 
 
91
80
inline int my_decimal_int_part(uint32_t precision, uint32_t decimals)
92
81
{
93
82
  return precision - ((decimals == DECIMAL_NOT_SPECIFIED) ? 0 : decimals);