summaryrefslogtreecommitdiff
path: root/sql/mysql_priv.h
diff options
context:
space:
mode:
authorunknown <tnurnberg@sin.intern.azundris.com>2007-07-13 17:50:58 +0200
committerunknown <tnurnberg@sin.intern.azundris.com>2007-07-13 17:50:58 +0200
commita7e5f73abb9da35a1c199b89df84596cffe59901 (patch)
tree4007509ecd111a8683949ba87a70617d62f10a9b /sql/mysql_priv.h
parent377853e24f82472c7a0a8806b9f1fd3841b25050 (diff)
downloadmariadb-git-a7e5f73abb9da35a1c199b89df84596cffe59901.tar.gz
Bug#27198: Error returns from time() are ignored
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.
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r--sql/mysql_priv.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 3972a01f7ba..173bfe678e8 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -302,6 +302,14 @@ inline THD *_current_thd(void)
}
#define current_thd _current_thd()
+/* log.cc */
+void sql_perror(const char *message);
+
+void vprint_msg_to_log( enum loglevel level, const char *format, va_list args );
+void sql_print_error( const char *format, ... );
+void sql_print_warning( const char *format, ...);
+void sql_print_information( const char *format, ...);
+
#include "sql_string.h"
#include "sql_list.h"
#include "sql_map.h"
@@ -657,15 +665,6 @@ void key_unpack(String *to,TABLE *form,uint index);
bool check_if_key_used(TABLE *table, uint idx, List<Item> &fields);
void init_errmessage(void);
-void sql_perror(const char *message);
-
-void vprint_msg_to_log( enum loglevel level, const char *format, va_list args );
-void sql_print_error( const char *format, ... );
-void sql_print_warning( const char *format, ...);
-void sql_print_information( const char *format, ...);
-
-
-
bool fn_format_relative_to_data_home(my_string to, const char *name,
const char *dir, const char *extension);
bool open_log(MYSQL_LOG *log, const char *hostname,