~stewart/drizzle/haildb-2.3-athens-updates

« back to all changes in this revision

Viewing changes to drizzled/field/date.cc

  • Committer: lbieber
  • Date: 2010-10-05 22:23:12 UTC
  • mfrom: (1813.1.4 build)
  • Revision ID: lbieber@orisndriz08-20101005222312-weuq0ardk3gcryau
Merge Travis - 621861 - convert structs to classes
Merge Billy - 621331 - Replace use of stringstream with boost::lexical_cast
Merge Travis - 621861 = To change C structs to C++ classes in Drizzle
Merge Andrew - fix bug 653300 - Syntax error on inport of a SQL file produced by drizzledump

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
#include "config.h"
 
22
#include <boost/lexical_cast.hpp>
 
23
 
22
24
#include "drizzled/field/date.h"
23
25
#include "drizzled/error.h"
24
26
#include "drizzled/table.h"
108
110
  DateTime temporal;
109
111
  if (! temporal.from_int64_t(from))
110
112
  {
111
 
    /* Convert the integer to a string using stringstream */
112
 
    std::stringstream ss;
113
 
    std::string tmp;
114
 
    ss << from; ss >> tmp;
 
113
    /* Convert the integer to a string using boost::lexical_cast */
 
114
    std::string tmp(boost::lexical_cast<std::string>(from)); 
115
115
 
116
116
    my_error(ER_INVALID_DATETIME_VALUE, MYF(ME_FATALERROR), tmp.c_str());
117
117
    return 2;