~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/num1.cc

  • Committer: Monty Taylor
  • Date: 2009-04-25 19:24:49 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 1003.
  • Revision ID: mordred@inaugust.com-20090425192449-0htujbt2r9jzupn5
Moved heap.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include <drizzled/server_includes.h>
21
21
 
 
22
#include CSTDINT_H
22
23
#include <cassert>
23
24
 
24
25
#include <drizzled/function/num1.h>
25
26
 
26
 
namespace drizzled
27
 
{
28
 
 
29
27
/**
30
28
  Set result type for a numeric function of one argument
31
29
  (can be also used by a numeric function of many arguments, if the result
38
36
  case INT_RESULT:
39
37
    unsigned_flag= args[0]->unsigned_flag;
40
38
    break;
41
 
 
42
39
  case STRING_RESULT:
43
40
  case REAL_RESULT:
44
41
    hybrid_type= REAL_RESULT;
45
42
    max_length= float_length(decimals);
46
43
    break;
47
 
 
48
44
  case DECIMAL_RESULT:
49
45
    break;
50
 
 
51
 
  case ROW_RESULT:
 
46
  default:
52
47
    assert(0);
53
48
  }
 
49
  return;
54
50
}
55
51
 
56
52
void Item_func_num1::fix_num_length_and_dec()
60
56
}
61
57
 
62
58
 
63
 
} /* namespace drizzled */
 
59