diff options
author | unknown <msvensson@neptunus.(none)> | 2005-09-27 16:48:41 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2005-09-27 16:48:41 +0200 |
commit | e4fe90bfa767366a4784adb4e7c65bca7c5c0537 (patch) | |
tree | e9d5a032240e2967ee443386858aef9349c15b59 /mysys | |
parent | ab7ec7ee8f4ac8c751c6f0d84d8314154146bf10 (diff) | |
parent | b9ace625400f3b5c13c23236d13f93a2f886b326 (diff) | |
download | mariadb-git-e4fe90bfa767366a4784adb4e7c65bca7c5c0537.tar.gz |
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/fix_mysqltest/my41-fix_mysqltest
client/mysqltest.c:
Manual merge
mysql-test/mysql-test-run.pl:
patch alredy commited
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_init.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/mysys/my_init.c b/mysys/my_init.c index bee485c3bed..3e5130ec670 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -127,11 +127,23 @@ my_bool my_init(void) void my_end(int infoflag) { - FILE *info_file; - if (!(info_file=DBUG_FILE)) - info_file=stderr; - DBUG_PRINT("info",("Shutting down")); - if (infoflag & MY_CHECK_ERROR || info_file != stderr) + /* + this code is suboptimal to workaround a bug in + Sun CC: Sun C++ 5.6 2004/06/02 for x86, and should not be + optimized until this compiler is not in use anymore + */ + FILE *info_file= DBUG_FILE; + my_bool print_info= (info_file != stderr); + DBUG_ENTER("my_end"); + if (!info_file) + { + info_file= stderr; + print_info= 0; + } + + DBUG_PRINT("info",("Shutting down: print_info: %d", print_info)); + if ((infoflag & MY_CHECK_ERROR) || print_info) + { /* Test if some file is left open */ if (my_file_opened | my_stream_opened) { @@ -141,7 +153,8 @@ void my_end(int infoflag) } } my_once_free(); - if (infoflag & MY_GIVE_INFO || info_file != stderr) + + if ((infoflag & MY_GIVE_INFO) || print_info) { #ifdef HAVE_GETRUSAGE struct rusage rus; |