~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Jay Pipes
  • Date: 2009-09-21 14:33:44 UTC
  • mfrom: (1126.10.26 dtrace-probes)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: jpipes@serialcoder-20090921143344-jnarp7gcn6zmg19c
Merge fixes from Trond and Padraig on dtrace 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/temporal.h"
23
23
#include "drizzled/error.h"
24
24
#include "drizzled/session.h"
25
25
#include "drizzled/calendar.h"
26
26
#include "drizzled/function/time/extract.h"
27
27
 
28
 
namespace drizzled
29
 
{
30
 
 
31
28
/*
32
29
   'interval_names' reflects the order of the enumeration interval_type.
33
30
   See item/time.h
70
67
  case INTERVAL_HOUR_MICROSECOND: max_length=13; date_value=0; break;
71
68
  case INTERVAL_MINUTE_MICROSECOND: max_length=11; date_value=0; break;
72
69
  case INTERVAL_SECOND_MICROSECOND: max_length=9; date_value=0; break;
73
 
  case INTERVAL_LAST: assert(0); break;
 
70
  case INTERVAL_LAST: assert(0); break; /* purecov: deadcode */
74
71
  }
75
72
}
76
73
 
86
83
  }
87
84
 
88
85
  /* We could have either a datetime or a time.. */
89
 
  DateTime datetime_temporal;
90
 
  Time time_temporal;
 
86
  drizzled::DateTime datetime_temporal;
 
87
  drizzled::Time time_temporal;
91
88
 
92
89
  /* Abstract pointer type we'll use in the final switch */
93
 
  Temporal *temporal;
 
90
  drizzled::Temporal *temporal;
94
91
 
95
92
  if (date_value)
96
93
  {
324
321
    case INTERVAL_LAST: 
325
322
    default:
326
323
        assert(0); 
327
 
        return 0;
 
324
        return 0;  /* purecov: deadcode */
328
325
  }
329
326
}
330
327
 
344
341
      return 0;
345
342
  return 1;
346
343
}
347
 
 
348
 
} /* namespace drizzled */