diff options
author | unknown <hf@deer.mysql.r18.ru> | 2003-03-10 14:06:21 +0400 |
---|---|---|
committer | unknown <hf@deer.mysql.r18.ru> | 2003-03-10 14:06:21 +0400 |
commit | 3223245de3177fb42ce415b35f9edd050a5733b1 (patch) | |
tree | 367d5c6e0a44ae96371139acb25913d5c39ff815 /libmysqld | |
parent | 64cf72900c4780e5bb32bd48dab7358dd0b08f62 (diff) | |
download | mariadb-git-3223245de3177fb42ce415b35f9edd050a5733b1.tar.gz |
Handling of log-error added in embedded server
libmysqld/lib_sql.cc:
handling of log-error added to embedded server
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/lib_sql.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index fad596d30b9..641fd2bb2c1 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -403,6 +403,21 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups) DBUG_PRINT("info",("%s Ver %s for %s on %s\n",my_progname, server_version, SYSTEM_TYPE,MACHINE_TYPE)); + if (opt_error_log) + { + if (!log_error_file_ptr[0]) + fn_format(log_error_file, glob_hostname, mysql_data_home, ".err", 0); + else + fn_format(log_error_file, log_error_file_ptr, mysql_data_home, ".err", + MY_UNPACK_FILENAME | MY_SAFE_PATH); + if (!log_error_file[0]) + opt_error_log= 1; // Too long file name + else + { + freopen(log_error_file, "a+", stderr); + } + } + /* These must be set early */ (void) pthread_mutex_init(&LOCK_mysql_create_db,MY_MUTEX_INIT_SLOW); |