~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/epoch.cc

  • Committer: Brian Aker
  • Date: 2011-01-13 00:08:59 UTC
  • mto: (2082.4.1 timestamp)
  • mto: This revision was merged to the branch mainline in revision 2098.
  • Revision ID: brian@tangent.org-20110113000859-8dw4ybnp8id56u50
Fix issue with return value from unix_timestamp(). Also clean up error
messages, and remove limit on value for timestamp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
 
163
163
  if (not temporal.from_string(from, (size_t) len))
164
164
  {
165
 
    my_error(ER_INVALID_UNIX_TIMESTAMP_VALUE, MYF(ME_FATALERROR), from);
 
165
    my_error(ER_INVALID_TIMESTAMP_VALUE, MYF(ME_FATALERROR), from);
166
166
    return 1;
167
167
  }
168
168
 
187
187
    ss << from; 
188
188
    ss >> tmp;
189
189
 
190
 
    my_error(ER_INVALID_UNIX_TIMESTAMP_VALUE, MYF(ME_FATALERROR), tmp.c_str());
 
190
    my_error(ER_INVALID_TIMESTAMP_VALUE, MYF(ME_FATALERROR), tmp.c_str());
191
191
    return 2;
192
192
  }
193
193
  return Epoch::store((int64_t) rint(from), false);
207
207
    /* Convert the integer to a string using boost::lexical_cast */
208
208
    std::string tmp(boost::lexical_cast<std::string>(from));
209
209
 
210
 
    my_error(ER_INVALID_UNIX_TIMESTAMP_VALUE, MYF(ME_FATALERROR), tmp.c_str());
 
210
    my_error(ER_INVALID_TIMESTAMP_VALUE, MYF(ME_FATALERROR), tmp.c_str());
211
211
    return 2;
212
212
  }
213
213