From f0d86d717c9eb686f7705b3bfff5a9c4884548d8 Mon Sep 17 00:00:00 2001
From: unknown <rburnett@build.mysql.com>
Date: Thu, 19 Aug 2004 20:26:00 +0200
Subject: [PATCH] Bug #4466  	Nothing in .err when mysql service ends
 because of malformed my.ini options

my_getopt.c:
  Moved the inclusion of my_getopt.h down below the inclusion of my_sys.h so that enum loglevel definition would be available
my_sys.h, my_getopt.h:
  moved definition of enum loglevel from my_getopt.h to my_sys.h


include/my_getopt.h:
  moved definition of enum loglevel from my_getopt.h to my_sys.h
include/my_sys.h:
  moved definition of enum loglevel from my_getopt.h to my_sys.h
mysys/my_getopt.c:
  Moved the inclusion of my_getopt.h down below the inclusion of my_sys.h so that enum loglevel definition would be available
---
 include/my_getopt.h | 6 ------
 include/my_sys.h    | 6 ++++++
 mysys/my_getopt.c   | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/my_getopt.h b/include/my_getopt.h
index f3db2a70a92..f5b847f7dda 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -53,12 +53,6 @@ struct my_option
 extern char *disabled_my_option;
 extern my_bool my_getopt_print_errors;
 
-enum loglevel {
-   ERROR_LEVEL,
-   WARNING_LEVEL,
-   INFORMATION_LEVEL
-};
-
 typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * );
 typedef void (* my_error_reporter) (enum loglevel level, const char *format, ... );
 
diff --git a/include/my_sys.h b/include/my_sys.h
index 4934df3c4e5..9e43889d0e0 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -261,6 +261,12 @@ typedef struct st_typelib {	/* Different types saved here */
   const char **type_names;
 } TYPELIB;
 
+enum loglevel {
+   ERROR_LEVEL,
+   WARNING_LEVEL,
+   INFORMATION_LEVEL
+};
+
 enum cache_type
 {
   READ_CACHE,WRITE_CACHE,
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 91671fcff5b..c471a30eb35 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -17,10 +17,10 @@
 #include <my_global.h>
 #include <m_string.h>
 #include <stdlib.h>
-#include <my_getopt.h>
 #include <assert.h>
 #include <my_sys.h>
 #include <mysys_err.h>
+#include <my_getopt.h>
 
 static int findopt(char *optpat, uint length,
 		   const struct my_option **opt_res,
-- 
2.30.9