summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_innodb.cc6
-rw-r--r--sql/ha_innodb.h3
-rw-r--r--sql/mysqld.cc5
3 files changed, 11 insertions, 3 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 21dd7f748c2..6319c1494d3 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -103,6 +103,7 @@ uint innobase_flush_log_at_trx_commit = 1;
my_bool innobase_log_archive = FALSE;
my_bool innobase_use_native_aio = FALSE;
my_bool innobase_fast_shutdown = TRUE;
+my_bool innobase_create_status_file = FALSE;
static char *internal_innobase_data_file_path = NULL;
@@ -861,6 +862,7 @@ innobase_init(void)
srv_force_recovery = (ulint) innobase_force_recovery;
srv_fast_shutdown = (ibool) innobase_fast_shutdown;
+ srv_innodb_status = (ibool) innobase_create_status_file;
srv_print_verbose_log = mysql_embedded ? 0 : 1;
@@ -4270,7 +4272,7 @@ ha_innobase::update_table_comment(
trx_search_latch_release_if_reserved(prebuilt->trx);
str = NULL;
- if (FILE* file = tmpfile()) {
+ if (FILE* file = os_file_create_tmpfile()) {
long flen;
/* output the data to a temporary file */
@@ -4330,7 +4332,7 @@ ha_innobase::get_foreign_key_create_info(void)
update_thd(current_thd);
- if (FILE* file = tmpfile()) {
+ if (FILE* file = os_file_create_tmpfile()) {
long flen;
prebuilt->trx->op_info = (char*)"getting info on foreign keys";
diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h
index 384b3dec949..5736f70c65c 100644
--- a/sql/ha_innodb.h
+++ b/sql/ha_innodb.h
@@ -203,7 +203,8 @@ extern char *innobase_log_group_home_dir, *innobase_log_arch_dir;
extern char *innobase_unix_file_flush_method;
/* The following variables have to be my_bool for SHOW VARIABLES to work */
extern my_bool innobase_log_archive,
- innobase_use_native_aio, innobase_fast_shutdown;
+ innobase_use_native_aio, innobase_fast_shutdown,
+ innobase_create_status_file;
extern "C" {
extern ulong srv_max_buf_pool_modified_pct;
}
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 55f58e9970e..3f7c187ccdd 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -3458,6 +3458,7 @@ enum options_mysqld {
OPT_INNODB_LOCK_WAIT_TIMEOUT,
OPT_INNODB_THREAD_CONCURRENCY,
OPT_INNODB_FORCE_RECOVERY,
+ OPT_INNODB_STATUS_FILE,
OPT_INNODB_MAX_DIRTY_PAGES_PCT,
OPT_BDB_CACHE_SIZE,
OPT_BDB_LOG_BUFFER_SIZE,
@@ -3625,6 +3626,10 @@ struct my_option my_long_options[] =
{"innodb_fast_shutdown", OPT_INNODB_FAST_SHUTDOWN,
"Speeds up server shutdown process", (gptr*) &innobase_fast_shutdown,
(gptr*) &innobase_fast_shutdown, 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
+ {"innodb_status_file", OPT_INNODB_STATUS_FILE,
+ "Enable SHOW INNODB STATUS output in the innodb_status.<pid> file",
+ (gptr*) &innobase_create_status_file, (gptr*) &innobase_create_status_file,
+ 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"innodb_max_dirty_pages_pct", OPT_INNODB_MAX_DIRTY_PAGES_PCT,
"Percentage of dirty pages allowed in bufferpool", (gptr*) &srv_max_buf_pool_modified_pct,
(gptr*) &srv_max_buf_pool_modified_pct, 0, GET_ULONG, REQUIRED_ARG, 90, 0, 100, 0, 0, 0},