• unknown's avatar
    Bug#27198: Error returns from time() are ignored · a7e5f73a
    unknown authored
    gettimeofday() can fail and presumably, so can time().
    Keep an eye on it.
    
    Since we have no data on this at all so far, we just
    retry on failure (and log the event), assuming that
    this is just an intermittant failure. This might of
    course hang the threat until we succeed. Once we know
    more about these failures, an appropriate more clever
    scheme may be picked (only try so many times per thread,
    etc., if that fails, return last "good" time() we got or
    some such).  Using sql_print_information() to log as this
    probably only occurs in high load scenarios where the debug-
    trace likely is disabled (or might interfere with testing
    the effect).  No test-case as this is a non-deterministic
    issue.
    
    
    sql/mysql_priv.h:
      Bug#27198: Error returns from time() are ignored
      
      move declarations for log.cc to before inclusion of
      sql_class.h as we now use sql_print_information() in
      there.
    sql/sql_class.h:
      Bug#27198: Error returns from time() are ignored
      
      gettimeofday() can fail and presumably, so can time().
      Keep an eye on it.
    a7e5f73a
sql_class.h 28.3 KB