~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/my_decimal.h

  • Committer: Brian Aker
  • Date: 2009-10-12 06:15:02 UTC
  • mfrom: (1165.1.178 static-functions)
  • Revision ID: brian@gaz-20091012061502-cds4m0cya7ow8sj7
Merge Stewart

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);