~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Jay Pipes
  • Date: 2009-01-28 02:39:29 UTC
  • mto: This revision was merged to the branch mainline in revision 815.
  • Revision ID: jpipes@serialcoder-20090128023929-gy7mot4ki11taytg
First function cleanup for temporal handling: YEAR()

* Added source files for calendrical calculations:
 drizzled/calendar.h
 drizzled/calendar.cc
* Added source files for new Temporal classes
 drizzled/temporal.h
 drizzled/temporal.cc
 drizzled/temporal_format.h
 drizzled/temporal_format.cc

Modified drizzled/function/time/year.cc to use the new
Temporal classes instead of the DRIZZLE_TIME struct and 
get_date().

Added new error codes for invalid DATETIME values and ensured
bad datetimes throw errors in calls to YEAR().

Added new test case specifically for the YEAR() function

Modified existing func_time and type_date test cases to expect
errors when calling YEAR() with bad datetimes.

Edited Makefile.am in drizzled/ to ensure libpcre is used during
build and that calendar.cc, temporal.cc and temporal_format.cc are
built.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
#include <drizzled/errmsg.h>
46
46
#include <drizzled/unireg.h>
47
47
#include <drizzled/plugin_scheduling.h>
48
 
 
 
48
#include "drizzled/temporal_format.h" /* For init_temporal_formats() */
49
49
 
50
50
#if TIME_WITH_SYS_TIME
51
51
# include <sys/time.h>
1895
1895
    return 1;
1896
1896
  if (set_var_init())
1897
1897
    return 1;
 
1898
  /* Creates static regex matching for temporal values */
 
1899
  if (! init_temporal_formats())
 
1900
    return 1;
1898
1901
  /*
1899
1902
    Process a comma-separated character set list and choose
1900
1903
    the first available character set. This is mostly for