~skinny.moey/drizzle/innodb-replication

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2010-11-08 22:35:57 UTC
  • mfrom: (1802.1.114 trunk)
  • Revision ID: brian@tangent.org-20101108223557-w3xzwp9hjjtjhtc1
MergeĀ inĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include "config.h"
 
21
#include <boost/lexical_cast.hpp>
21
22
#include "drizzled/function/time/from_days.h"
22
23
#include "drizzled/error.h"
23
24
#include "drizzled/temporal.h"
54
55
  if (! to.from_julian_day_number(int_value))
55
56
  {
56
57
    /* Bad input, throw an error */
57
 
    std::stringstream ss;
58
 
    std::string tmp;
59
 
    ss << int_value; ss >> tmp;
 
58
    std::string tmp(boost::lexical_cast<std::string>(int_value));
60
59
 
61
60
    my_error(ER_ARGUMENT_OUT_OF_RANGE, MYF(ME_FATALERROR), tmp.c_str(), func_name());
62
61
    return false;