mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Many files:
Merge InnoDB-3.23.52d innobase/btr/btr0sea.c: Merge InnoDB-3.23.52d innobase/buf/buf0buf.c: Merge InnoDB-3.23.52d innobase/buf/buf0lru.c: Merge InnoDB-3.23.52d innobase/include/buf0buf.h: Merge InnoDB-3.23.52d innobase/include/ha0ha.h: Merge InnoDB-3.23.52d innobase/include/log0log.h: Merge InnoDB-3.23.52d innobase/include/os0file.h: Merge InnoDB-3.23.52d innobase/include/os0thread.h: Merge InnoDB-3.23.52d innobase/include/ha0ha.ic: Merge InnoDB-3.23.52d innobase/include/os0sync.ic: Merge InnoDB-3.23.52d innobase/include/srv0start.h: Merge InnoDB-3.23.52d innobase/include/sync0rw.ic: Merge InnoDB-3.23.52d innobase/include/sync0sync.ic: Merge InnoDB-3.23.52d innobase/include/ut0dbg.h: Merge InnoDB-3.23.52d innobase/include/univ.i: Merge InnoDB-3.23.52d innobase/lock/lock0lock.c: Merge InnoDB-3.23.52d innobase/log/log0log.c: Merge InnoDB-3.23.52d innobase/mem/mem0pool.c: Merge InnoDB-3.23.52d innobase/os/os0file.c: Merge InnoDB-3.23.52d innobase/os/os0thread.c: Merge InnoDB-3.23.52d innobase/srv/srv0srv.c: Merge InnoDB-3.23.52d innobase/srv/srv0start.c: Merge InnoDB-3.23.52d innobase/sync/sync0arr.c: Merge InnoDB-3.23.52d innobase/sync/sync0rw.c: Merge InnoDB-3.23.52d innobase/sync/sync0sync.c: Merge InnoDB-3.23.52d innobase/thr/thr0loc.c: Merge InnoDB-3.23.52d innobase/trx/trx0trx.c: Merge InnoDB-3.23.52d innobase/configure.in: Merge InnoDB-3.23.52d sql/ha_innobase.cc: Merge InnoDB-3.23.52d
This commit is contained in:
@ -74,6 +74,12 @@ ulint ios;
|
||||
ulint n[SRV_MAX_N_IO_THREADS + 5];
|
||||
os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 5];
|
||||
|
||||
/* We use this mutex to test the return value of pthread_mutex_trylock
|
||||
on successful locking. HP-UX does NOT return 0, though Linux et al do. */
|
||||
os_fast_mutex_t srv_os_test_mutex;
|
||||
|
||||
ibool srv_os_test_mutex_is_locked = FALSE;
|
||||
|
||||
#define SRV_N_PENDING_IOS_PER_THREAD OS_AIO_N_PENDING_IOS_PER_THREAD
|
||||
#define SRV_MAX_N_PENDING_SYNC_IOS 100
|
||||
|
||||
@ -1353,6 +1359,22 @@ innobase_start_or_create_for_mysql(void)
|
||||
tablespace_size_in_header, sum_of_data_file_sizes);
|
||||
}
|
||||
|
||||
/* Check that os_fast_mutexes work as exptected */
|
||||
os_fast_mutex_init(&srv_os_test_mutex);
|
||||
|
||||
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");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
os_fast_mutex_unlock(&srv_os_test_mutex);
|
||||
|
||||
os_fast_mutex_lock(&srv_os_test_mutex);
|
||||
|
||||
os_fast_mutex_unlock(&srv_os_test_mutex);
|
||||
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr, " InnoDB: Started\n");
|
||||
|
||||
|
Reference in New Issue
Block a user