summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2005-09-28 11:34:53 +0200
committerunknown <msvensson@neptunus.(none)>2005-09-28 11:34:53 +0200
commit69bfcd9c400e0b00fe53aaee8da0b38b0bf5f9ad (patch)
tree5b0761b29daf8c864538d0fb55e20e9b54758e47 /mysys
parent59041a2b356943bda95d38c10e9ba01f7b2c7a73 (diff)
parente4fe90bfa767366a4784adb4e7c65bca7c5c0537 (diff)
downloadmariadb-git-69bfcd9c400e0b00fe53aaee8da0b38b0bf5f9ad.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-5.0 client/mysql.cc: Auto merged client/mysqltest.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/mysqltest.result: Auto merged mysql-test/t/mysqltest.test: Auto merged mysys/my_init.c: Auto merged sql/sql_update.cc: Auto merged Makefile.am: Manual merge mysql-test/r/cast.result: Manual merge mysql-test/t/cast.test: Manual merge ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp: Manual merge sql/ha_ndbcluster.cc: Manual merge sql/item.h: Manual merge sql/opt_sum.cc: Manual merge sql/sql_delete.cc: Manual merge sql/sql_lex.cc: Manual merge sql/sql_load.cc: Manual merge sql/sql_prepare.cc: Manual merge
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_init.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/mysys/my_init.c b/mysys/my_init.c
index abb1ad27f7b..f28f47e090e 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;