summaryrefslogtreecommitdiff
path: root/storage/xtradb/srv/srv0start.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-10-15 12:59:13 +0200
committerSergei Golubchik <serg@mariadb.org>2014-10-15 12:59:13 +0200
commitf62c12b405ba7ec80b8e2490856b83c6f5899211 (patch)
tree010605c7f145da6ea6ac14b39abc4cf700d619b1 /storage/xtradb/srv/srv0start.cc
parentf947f73b2b6d2bd246b81a9038224d2a85777520 (diff)
parentf1afc003eefe0aafd3e070c7453d9e029d8445a8 (diff)
downloadmariadb-git-f62c12b405ba7ec80b8e2490856b83c6f5899211.tar.gz
Merge 10.0.14 into 10.1
Diffstat (limited to 'storage/xtradb/srv/srv0start.cc')
-rw-r--r--storage/xtradb/srv/srv0start.cc45
1 files changed, 32 insertions, 13 deletions
diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc
index 86b0764d948..86bc8ce041e 100644
--- a/storage/xtradb/srv/srv0start.cc
+++ b/storage/xtradb/srv/srv0start.cc
@@ -1576,6 +1576,7 @@ innobase_start_or_create_for_mysql(void)
char logfilename[10000];
char* logfile0 = NULL;
size_t dirnamelen;
+ bool sys_datafiles_created = false;
/* This should be initialized early */
ut_init_timer();
@@ -1725,6 +1726,19 @@ innobase_start_or_create_for_mysql(void)
"" IB_ATOMICS_STARTUP_MSG "");
ib_logf(IB_LOG_LEVEL_INFO,
+ "" IB_MEMORY_BARRIER_STARTUP_MSG "");
+
+#ifndef HAVE_MEMORY_BARRIER
+#if defined __i386__ || defined __x86_64__ || defined _M_IX86 || defined _M_X64 || defined __WIN__
+#else
+ ib_logf(IB_LOG_LEVEL_WARN,
+ "MySQL was built without a memory barrier capability on this"
+ " architecture, which might allow a mutex/rw_lock violation"
+ " under high thread concurrency. This may cause a hang.");
+#endif /* IA32 or AMD64 */
+#endif /* HAVE_MEMORY_BARRIER */
+
+ ib_logf(IB_LOG_LEVEL_INFO,
"Compressed tables use zlib " ZLIB_VERSION
#ifdef UNIV_ZIP_DEBUG
" with validation"
@@ -2274,9 +2288,9 @@ innobase_start_or_create_for_mysql(void)
} else if (size != srv_log_file_size) {
ib_logf(IB_LOG_LEVEL_ERROR,
"Log file %s is"
- " of different size "UINT64PF" bytes"
+ " of different size " UINT64PF " bytes"
" than other log"
- " files "UINT64PF" bytes!",
+ " files " UINT64PF " bytes!",
logfilename,
size << UNIV_PAGE_SIZE_SHIFT,
(os_offset_t) srv_log_file_size
@@ -2528,6 +2542,15 @@ files_checked:
dict_check = DICT_CHECK_NONE_LOADED;
}
+ /* Create the SYS_TABLESPACES and SYS_DATAFILES system table */
+ err = dict_create_or_check_sys_tablespace();
+ if (err != DB_SUCCESS) {
+ return(err);
+ }
+
+ sys_datafiles_created = true;
+
+ /* This function assumes that SYS_DATAFILES exists */
dict_check_tablespaces_and_store_max_id(dict_check);
}
@@ -2709,13 +2732,6 @@ files_checked:
srv_undo_logs = ULONG_UNDEFINED;
}
- /* Flush the changes made to TRX_SYS_PAGE by trx_sys_create_rsegs()*/
- if (!srv_force_recovery && !srv_read_only_mode) {
- bool success = buf_flush_list(ULINT_MAX, LSN_MAX, NULL);
- ut_a(success);
- buf_flush_wait_batch_end(NULL, BUF_FLUSH_LIST);
- }
-
if (!srv_read_only_mode) {
/* Create the thread which watches the timeouts
for lock waits */
@@ -2740,10 +2756,13 @@ files_checked:
return(err);
}
- /* Create the SYS_TABLESPACES system table */
- err = dict_create_or_check_sys_tablespace();
- if (err != DB_SUCCESS) {
- return(err);
+ /* Create the SYS_TABLESPACES and SYS_DATAFILES system tables if we
+ have not done that already on crash recovery. */
+ if (sys_datafiles_created == false) {
+ err = dict_create_or_check_sys_tablespace();
+ if (err != DB_SUCCESS) {
+ return(err);
+ }
}
srv_is_being_started = FALSE;