diff options
author | unknown <rburnett@build.mysql.com> | 2004-08-18 22:31:01 +0200 |
---|---|---|
committer | unknown <rburnett@build.mysql.com> | 2004-08-18 22:31:01 +0200 |
commit | 992baee9b0d46968487e19d4b2d92982a3633a91 (patch) | |
tree | 148335b50c671c084bdd1129b4a87b07ba4eb79c /include | |
parent | 7c3ecdff7e099c9967fa00ab5028dfe05e32bae5 (diff) | |
download | mariadb-git-992baee9b0d46968487e19d4b2d92982a3633a91.tar.gz |
BUG# 4466 - Nothing in .err when mysql service ends because of malformed my.ini options
mysqld.cc:
Changed option_error_reporter to match new function header that includes LOGLEVEL enum
mysql_priv.h:
Removed the MY_ERROR style bitmask. Changed function headers to use new LOGLEVEL enum
log.cc:
Changed print_buffer_to_log to print_buffer_to_file. Remove the timestamp bool and now all log entries written to stderr are timestamped. Removed some unused commented code. changed to use the new LOGLEVEL enum.
my_getopt.c:
Changed functions to use the new LOGLEVEL enum and changed the included error reporter to be default_reporter. This reporter is used in handle_options if a reporter is not given
my_getopt.h:
changed typedefs to use better naming convention. Moved error bitmask into the LOGLEVEL enum and included it here.
include/my_getopt.h:
changed typedefs to use better naming convention. Moved error bitmask into the LOGLEVEL enum and included it here.
mysys/my_getopt.c:
Changed functions to use the new LOGLEVEL enum and changed the included error reporter to be default_reporter. This reporter is used in handle_options if a reporter is not given
sql/log.cc:
Changed print_buffer_to_log to print_buffer_to_file. Remove the timestamp bool and now all log entries written to stderr are timestamped. Removed some unused commented code. changed to use the new LOGLEVEL enum.
sql/mysql_priv.h:
Removed the MY_ERROR style bitmask. Changed function headers to use new LOGLEVEL enum
sql/mysqld.cc:
Changed option_error_reporter to match new function header that includes LOGLEVEL enum
Diffstat (limited to 'include')
-rw-r--r-- | include/my_getopt.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/include/my_getopt.h b/include/my_getopt.h index 01b21951972..9e26b12cb9e 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -14,6 +14,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#ifndef _my_getopt_h +#define _my_getopt_h + C_MODE_START #define GET_NO_ARG 1 @@ -50,14 +53,25 @@ struct my_option extern char *disabled_my_option; extern my_bool my_getopt_print_errors; -typedef my_bool (* hoGetOneOption) (int, const struct my_option *, char * ); -typedef void (* hoErrorReporter) (const char *format, va_list args ); +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, ... ); extern int handle_options (int *argc, char ***argv, - const struct my_option *longopts, hoGetOneOption, hoErrorReporter ); + const struct my_option *longopts, my_get_one_option, + my_error_reporter ); extern void my_print_help(const struct my_option *options); extern void my_print_variables(const struct my_option *options); ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp); my_bool getopt_compare_strings(const char *s, const char *t, uint length); + C_MODE_END + +#endif /* _my_getopt_h */ + |