~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to sql/field.cc

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-21 15:31:05 UTC
  • mfrom: (1.1.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20100621153105-pbbz3t6nyrf9t2zq
Tags: upstream-5.1.48
ImportĀ upstreamĀ versionĀ 5.1.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
5312
5312
 
5313
5313
bool Field_time::get_date(MYSQL_TIME *ltime, uint fuzzydate)
5314
5314
{
5315
 
  long tmp;
5316
5315
  THD *thd= table ? table->in_use : current_thd;
5317
5316
  if (!(fuzzydate & TIME_FUZZY_DATE))
5318
5317
  {
5322
5321
                        thd->row_count);
5323
5322
    return 1;
5324
5323
  }
5325
 
  tmp=(long) sint3korr(ptr);
5326
 
  ltime->neg=0;
5327
 
  if (tmp < 0)
5328
 
  {
5329
 
    ltime->neg= 1;
5330
 
    tmp=-tmp;
5331
 
  }
5332
 
  ltime->hour=tmp/10000;
5333
 
  tmp-=ltime->hour*10000;
5334
 
  ltime->minute=   tmp/100;
5335
 
  ltime->second= tmp % 100;
5336
 
  ltime->year= ltime->month= ltime->day= ltime->second_part= 0;
5337
 
  return 0;
 
5324
  return Field_time::get_time(ltime);
5338
5325
}
5339
5326
 
5340
5327