~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/log_event.cc

  • Committer: Toru Maesaka
  • Date: 2008-12-17 07:16:37 UTC
  • mto: (685.1.40 devel) (713.1.5 devel)
  • mto: This revision was merged to the branch mainline in revision 713.
  • Revision ID: dev@torum.net-20081217071637-7j9040w7lpms77r2
Removed my_time() and added error checking

Show diffs side-by-side

added added

removed removed

Lines of Context:
499
499
  :temp_buf(0), exec_time(0), flags(0), cache_stmt(0),
500
500
   session(0)
501
501
{
502
 
  server_id=    ::server_id;
 
502
  server_id= ::server_id;
503
503
  /*
504
 
    We can't call my_time() here as this would cause a call before
 
504
    We can't call time() here as this would cause a call before
505
505
    my_init() is called
506
506
  */
507
507
  when=         0;
748
748
    return session->start_time;
749
749
  if ((tmp_session= current_session))
750
750
    return tmp_session->start_time;
751
 
  return my_time(0);
 
751
  return time(0);
752
752
}
753
753
 
754
754
 
4606
4606
      problem.  When WL#2975 is implemented, just remove the member
4607
4607
      Relay_log_info::last_event_start_time and all its occurrences.
4608
4608
    */
4609
 
    const_cast<Relay_log_info*>(rli)->last_event_start_time= my_time(0);
 
4609
    time_t t= time(0);
 
4610
 
 
4611
    /* don't trust time() all the time */
 
4612
    if (t == (time_t)-1)
 
4613
      return (-1);
 
4614
    const_cast<Relay_log_info*>(rli)->last_event_start_time= time(0);
4610
4615
  }
4611
4616
 
4612
4617
  return(0);