Commit ac8e3c85 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-15295 Type mismatch for srv_fatal_semaphore_wait_threshold

parent 1a10b261
......@@ -15054,7 +15054,7 @@ ha_innobase::check(
&& !dict_index_is_corrupted(index)) {
/* Enlarge the fatal lock wait timeout during
CHECK TABLE. */
my_atomic_addlint(
my_atomic_addlong(
&srv_fatal_semaphore_wait_threshold,
SRV_SEMAPHORE_WAIT_EXTENSION);
......@@ -15063,7 +15063,7 @@ ha_innobase::check(
/* Restore the fatal lock wait timeout after
CHECK TABLE. */
my_atomic_addlint(
my_atomic_addlong(
&srv_fatal_semaphore_wait_threshold,
-SRV_SEMAPHORE_WAIT_EXTENSION);
......
......@@ -1827,7 +1827,7 @@ struct buf_block_t{
} while (0)
# define assert_block_ahi_valid(block) \
ut_a((block)->index \
|| my_atomic_addlint(&(block)->n_pointers, 0) == 0)
|| my_atomic_loadlint(&(block)->n_pointers) == 0)
# else /* UNIV_AHI_DEBUG || UNIV_DEBUG */
# define assert_block_ahi_empty(block) /* nothing */
# define assert_block_ahi_empty_on_init(block) /* nothing */
......
......@@ -1156,9 +1156,41 @@ enum rw_lock_flag_t {
#endif /* UNIV_INNOCHECKSUM */
#ifdef _WIN64
#define my_atomic_addlint(A,B) my_atomic_add64((int64*) (A), (B))
#define my_atomic_loadlint(A) my_atomic_load64((int64*) (A))
#define my_atomic_caslint(A,B,C) my_atomic_cas64((int64*) (A), (int64*) (B), (C))
static inline ulint my_atomic_addlint(ulint *A, ulint B)
{
return ulint(my_atomic_add64((volatile int64*)A, B));
}
static inline ulint my_atomic_loadlint(const ulint *A)
{
return ulint(my_atomic_load64((volatile int64*)A));
}
static inline lint my_atomic_addlint(volatile lint *A, lint B)
{
return my_atomic_add64((volatile int64*)A, B);
}
static inline lint my_atomic_loadlint(const lint *A)
{
return lint(my_atomic_load64((volatile int64*)A));
}
static inline void my_atomic_storelint(ulint *A, ulint B)
{
my_atomic_store64((volatile int64*)A, B);
}
static inline lint my_atomic_caslint(volatile lint *A, lint *B, lint C)
{
return my_atomic_cas64((volatile int64*)A, (int64 *)B, C);
}
static inline ulint my_atomic_caslint(ulint *A, ulint *B, ulint C)
{
return my_atomic_cas64((volatile int64*)A, (int64 *)B, (int64)C);
}
#else
#define my_atomic_addlint my_atomic_addlong
#define my_atomic_loadlint my_atomic_loadlong
......@@ -1188,7 +1220,7 @@ struct MY_ALIGNED(CPU_LEVEL1_DCACHE_LINESIZE) simple_counter
#pragma warning (push)
#pragma warning (disable : 4244)
#endif
return Type(my_atomic_addlint(reinterpret_cast<lint*>
return Type(my_atomic_addlint(reinterpret_cast<ulint*>
(&m_counter), i));
#ifdef _MSC_VER
#pragma warning (pop)
......
......@@ -517,9 +517,9 @@ class purge_sys_t
parallelized purge operation */
ReadView view; /*!< The purge will not remove undo logs
which are >= this view (purge view) */
volatile ulint n_submitted; /*!< Count of total tasks submitted
ulint n_submitted; /*!< Count of total tasks submitted
to the task queue */
volatile ulint n_completed; /*!< Count of total tasks completed */
ulint n_completed; /*!< Count of total tasks completed */
/*------------------------------*/
/* The following two fields form the 'purge pointer' which advances
......
......@@ -78,11 +78,11 @@ struct srv_conc_t {
This is no longer true. We'll, however, keep the lint datatype to add
assertions to catch any corner cases that we may have missed. */
volatile lint n_active;
ulint n_active;
/** Number of OS threads waiting in the FIFO for permission to
enter InnoDB */
volatile lint n_waiting;
ulint n_waiting;
};
/* Control variables for tracking concurrency. */
......@@ -152,7 +152,7 @@ srv_conc_enter_innodb_with_atomics(
return;
}
if (srv_conc.n_active < (lint) srv_thread_concurrency) {
if (srv_conc.n_active < srv_thread_concurrency) {
ulint n_active;
/* Check if there are any free tickets. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment