summaryrefslogtreecommitdiff
path: root/innobase/srv
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2002-11-06 00:41:27 +0200
committerheikki@hundin.mysql.fi <>2002-11-06 00:41:27 +0200
commitdb1693101b55792eca89bda585e37eab4a030c76 (patch)
treefed8334ab45443418d527c3837593e1121ed1975 /innobase/srv
parenta6e5f9217c5443fb5cedfef012517f37b4df6cf1 (diff)
downloadmariadb-git-db1693101b55792eca89bda585e37eab4a030c76.tar.gz
Many files:
Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock
Diffstat (limited to 'innobase/srv')
-rw-r--r--innobase/srv/srv0srv.c17
-rw-r--r--innobase/srv/srv0start.c16
2 files changed, 24 insertions, 9 deletions
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index 11e45df4ce3..51d7878fd29 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -51,6 +51,10 @@ Created 10/8/1995 Heikki Tuuri
#include "srv0start.h"
#include "row0mysql.h"
+/* This is set to TRUE if the MySQL user has set it in MySQL; currently
+affects only FOREIGN KEY definition parsing */
+ibool srv_lower_case_table_names = FALSE;
+
/* Buffer which can be used in printing fatal error messages */
char srv_fatal_errbuf[5000];
@@ -2064,6 +2068,7 @@ srv_suspend_mysql_thread(
os_event_t event;
double wait_time;
trx_t* trx;
+ ibool had_dict_lock = FALSE;
ut_ad(!mutex_own(&kernel_mutex));
@@ -2107,18 +2112,22 @@ srv_suspend_mysql_thread(
srv_conc_force_exit_innodb(thr_get_trx(thr));
/* Release possible foreign key check latch */
- if (trx->has_dict_operation_lock) {
+ if (trx->dict_operation_lock_mode == RW_S_LATCH) {
+
+ had_dict_lock = TRUE;
- rw_lock_s_unlock(&dict_operation_lock);
+ row_mysql_unfreeze_data_dictionary(trx);
}
+ ut_a(trx->dict_operation_lock_mode == 0);
+
/* Wait for the release */
os_event_wait(event);
- if (trx->has_dict_operation_lock) {
+ if (had_dict_lock) {
- rw_lock_s_lock(&dict_operation_lock);
+ row_mysql_freeze_data_dictionary(trx);
}
/* Return back inside InnoDB */
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
index cad946b1e54..d006b4ec915 100644
--- a/innobase/srv/srv0start.c
+++ b/innobase/srv/srv0start.c
@@ -1380,7 +1380,7 @@ innobase_start_or_create_for_mysql(void)
if (0 != os_fast_mutex_trylock(&srv_os_test_mutex)) {
fprintf(stderr,
"InnoDB: Error: pthread_mutex_trylock returns an unexpected value on\n"
- "InnoDB: success! Cannot continue.\n");
+"InnoDB: success! Cannot continue.\n");
exit(1);
}
@@ -1390,11 +1390,17 @@ innobase_start_or_create_for_mysql(void)
os_fast_mutex_unlock(&srv_os_test_mutex);
- if (srv_print_verbose_log)
- {
- ut_print_timestamp(stderr);
- fprintf(stderr, " InnoDB: Started\n");
+ if (srv_print_verbose_log) {
+ ut_print_timestamp(stderr);
+ fprintf(stderr, " InnoDB: Started\n");
}
+
+ if (srv_force_recovery > 0) {
+ fprintf(stderr,
+ "InnoDB: !!! innodb_force_recovery is set to %lu !!!\n",
+ srv_force_recovery);
+ }
+
return((int) DB_SUCCESS);
}