diff options
author | unknown <monty@mysql.com> | 2003-11-22 03:21:40 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2003-11-22 03:21:40 +0200 |
commit | bab6d9f74ba495e333a334e03f3ae509361dada5 (patch) | |
tree | f843dfed18127f94f90e6cffa6456e545f7b6b57 /sql/ha_innodb.cc | |
parent | 52521cc8c76f99d2046a72a09440e616797e672a (diff) | |
download | mariadb-git-bab6d9f74ba495e333a334e03f3ae509361dada5.tar.gz |
Don't flush cur_log (relay log) on flush_relay_log_info becasue this crashes the server if cur_log is 'hot' and the io_thread has changed log file.
Updated project files for windows
Made rpl_change_master.test portable
Ensure that mutex are not freed if not initilized
VC++Files/client/mysql.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/comp_err/comp_err.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/innobase/innobase.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/libmysqld/examples/test_libmysqld.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/libmysqld/libmysqld.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/myisamchk/myisamchk.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/myisamlog/myisamlog.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/myisampack/myisampack.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/mysqlmanager/MySqlManager.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/mysqlshutdown/mysqlshutdown.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/mysys/mysys.dsp:
Updated project files for windows according to suggestions from Intel
libmysql/libmysql.c:
Removed not used include files (which caused problems on Win64)
mysql-test/r/rpl_change_master.result:
Made test portable
mysql-test/t/rpl_change_master.test:
Made test portable
sql-common/client.c:
Removed not used include files (which caused problems on Win64)
sql/ha_innodb.cc:
Ensure that mutex is not freed if not initilized
sql/hostname.cc:
Ensure that mutex is not freed if not initilized
sql/slave.cc:
Don't flush cur_log (relay log) on flush_relay_log_info becasue this crashes the server if cur_log is 'hot' and the io_thread has changed log file.
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r-- | sql/ha_innodb.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index f79c5b55927..671c62d5cf8 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -46,6 +46,7 @@ InnoDB */ #include "ha_innodb.h" pthread_mutex_t innobase_mutex; +bool innodb_inited= 0; /* Store MySQL definition of 'byte': in Linux it is char while InnoDB uses unsigned char; the header univ.i which we include next defines @@ -898,6 +899,7 @@ innobase_init(void) (void) hash_init(&innobase_open_tables,system_charset_info, 32, 0, 0, (hash_get_key) innobase_get_key, 0, 0); pthread_mutex_init(&innobase_mutex, MY_MUTEX_INIT_FAST); + innodb_inited= 1; /* If this is a replication slave and we needed to do a crash recovery, set the master binlog position to what InnoDB internally knew about @@ -925,21 +927,21 @@ innobase_end(void) /*==============*/ /* out: TRUE if error */ { - int err; + int err= 0; DBUG_ENTER("innobase_end"); - err = innobase_shutdown_for_mysql(); - hash_free(&innobase_open_tables); - my_free(internal_innobase_data_file_path,MYF(MY_ALLOW_ZERO_PTR)); - pthread_mutex_destroy(&innobase_mutex); - - if (err != DB_SUCCESS) { - - DBUG_RETURN(1); + if (innodb_inited) + { + innodb_inited= 0; + if (innobase_shutdown_for_mysql() != DB_SUCCESS) + err= 1; + hash_free(&innobase_open_tables); + my_free(internal_innobase_data_file_path,MYF(MY_ALLOW_ZERO_PTR)); + pthread_mutex_destroy(&innobase_mutex); } - DBUG_RETURN(0); + DBUG_RETURN(err); } /******************************************************************** |