~drizzle-trunk/drizzle/development

Viewing all changes in revision 813.1.12.

  • Committer: Jay Pipes
  • Date: 2009-01-29 19:47:12 UTC
  • mto: This revision was merged to the branch mainline in revision 820.
  • Revision ID: jpipes@serialcoder-20090129194712-2dtgucnwscs8di24
Fixes for SECOND() function to use new Temporal system.  Because
MySQL implicitly converts integers to strings, but only for 
DATETIME, not TIME, there is a bit of hack in functions/time/second.cc
right now which may be refactored when Temporals are made real, 
immutable ValueObjects.

Added new test case for the SECOND() function.

Added comments in function/time/year.cc to indicate a bit better
what we are doing, and added a define for the max length a datetime
is represented as a string.

Corrected regex matching in following ways:

Added start ^ and end $ to catch issues with greedy matching on dates
before datetime strings.

Added check for the usecond and nsecond indexes in the regex matches.
Checks for datetimes with microsecond parts were not properly being 
matched because of an incorrect calculation in TemporalFormat::matches()

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: