~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/timestamp.cc

  • Committer: earney
  • Date: 2010-10-04 13:15:05 UTC
  • mto: (1813.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 1814.
  • Revision ID: earney@earney.homedns.org-20101004131505-1mknj0drou0am13f
removed old commented out statements and uncommmeted out first occurance of stringstream in date.cc since it sets the precision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
  if (from < 0 || from > 99991231235959.0)
185
185
  {
186
186
    /* Convert the double to a string using stringstream */
187
 
    //std::stringstream ss;
188
 
    //std::string tmp;
189
 
    //ss.precision(18); /* 18 places should be fine for error display of double input. */
190
 
    //ss << from; ss >> tmp;
191
 
    std::string tmp(boost::lexical_cast<std::string>(from));
 
187
    std::stringstream ss;
 
188
    std::string tmp;
 
189
    ss.precision(18); /* 18 places should be fine for error display of double input. */
 
190
    ss << from; 
 
191
    ss >> tmp;
192
192
 
193
193
    my_error(ER_INVALID_UNIX_TIMESTAMP_VALUE, MYF(ME_FATALERROR), tmp.c_str());
194
194
    return 2;
207
207
  Timestamp temporal;
208
208
  if (! temporal.from_int64_t(from))
209
209
  {
210
 
    /* Convert the integer to a string using stringstream */
211
 
    //std::stringstream ss;
212
 
    //std::string tmp;
213
 
    //ss << from; ss >> tmp;
 
210
    /* Convert the integer to a string using boost::lexical_cast */
214
211
    std::string tmp(boost::lexical_cast<std::string>(from));
215
212
 
216
213
    my_error(ER_INVALID_UNIX_TIMESTAMP_VALUE, MYF(ME_FATALERROR), tmp.c_str());