~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Monty Taylor
  • Date: 2010-06-02 22:35:45 UTC
  • mto: This revision was merged to the branch mainline in revision 1586.
  • Revision ID: mordred@inaugust.com-20100602223545-q8ekf9b40a85nwuf
Rearragned unittests into a single exe because of how we need to link it
(thanks lifeless)
Link with server symbols without needing to build a library.
Added an additional atomics test which tests whatever version of the atomics
lib the running platform would actually use.

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