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

« back to all changes in this revision

Viewing changes to drizzled/function/time/from_unixtime.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:
18
18
 */
19
19
 
20
20
#include "config.h"
21
 
 
 
21
#include <boost/lexical_cast.hpp>
22
22
#include "drizzled/function/time/from_unixtime.h"
23
23
#include "drizzled/session.h"
24
24
#include "drizzled/temporal.h"
85
85
  if (! temporal.from_time_t((time_t) tmp))
86
86
  {
87
87
    null_value= true;
88
 
    std::stringstream ss;
89
 
    std::string tmp_string;
90
 
    ss << tmp; ss >> tmp_string;
 
88
    std::string tmp_string(boost::lexical_cast<std::string>(tmp));
91
89
    my_error(ER_INVALID_UNIX_TIMESTAMP_VALUE, MYF(0), tmp_string.c_str());
92
90
    return 0;
93
91
  }