~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/period_add.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-09-13 01:03:01 UTC
  • mto: (1126.9.2 captain-20090915-01)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: osullivan.padraig@gmail.com-20090913010301-tcvvezipx1124acy
Added calls to the dtrace delete begin/end probes.

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"
21
 
 
 
20
#include "drizzled/server_includes.h"
 
21
#include CSTDINT_H
22
22
#include "drizzled/function/time/period_add.h"
23
23
#include "drizzled/calendar.h"
24
24
 
25
 
namespace drizzled
26
 
{
27
 
 
28
25
int64_t Item_func_period_add::val_int()
29
26
{
30
27
  assert(fixed == 1);
33
30
 
34
31
  if ((null_value= args[0]->null_value || args[1]->null_value) ||
35
32
      period == 0L)
36
 
    return 0;
 
33
    return 0; /* purecov: inspected */
37
34
 
38
35
  return (int64_t) months_to_year_month(year_month_to_months(period) + months);
39
36
}
40
 
 
41
 
} /* namespace drizzled */