Commit 7331b83e authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-9282 follow-up: Remove an unused variable.

Remove the unused variable innodb_calling_exit which was added
in MySQL 5.7 in an attempt to avoid failures in other threads when
an I/O thread calls exit().

Since MDEV-9282, InnoDB or XtraDB MariaDB Server is not calling
exit() at all, and the variable innodb_calling_exit was never set.
parent ff0530ef
/***************************************************************************** /*****************************************************************************
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -74,7 +75,7 @@ struct OSTrackMutex { ...@@ -74,7 +75,7 @@ struct OSTrackMutex {
void destroy() UNIV_NOTHROW void destroy() UNIV_NOTHROW
{ {
ut_ad(!m_locked); ut_ad(!m_locked);
ut_ad(innodb_calling_exit || !m_freed); ut_ad(!m_freed);
m_mutex.destroy(); m_mutex.destroy();
...@@ -86,7 +87,7 @@ struct OSTrackMutex { ...@@ -86,7 +87,7 @@ struct OSTrackMutex {
{ {
ut_ad(m_locked); ut_ad(m_locked);
ut_d(m_locked = false); ut_d(m_locked = false);
ut_ad(innodb_calling_exit || !m_freed); ut_ad(!m_freed);
m_mutex.exit(); m_mutex.exit();
} }
...@@ -103,7 +104,7 @@ struct OSTrackMutex { ...@@ -103,7 +104,7 @@ struct OSTrackMutex {
uint32_t line) uint32_t line)
UNIV_NOTHROW UNIV_NOTHROW
{ {
ut_ad(innodb_calling_exit || !m_freed); ut_ad(!m_freed);
m_mutex.enter(); m_mutex.enter();
...@@ -114,7 +115,7 @@ struct OSTrackMutex { ...@@ -114,7 +115,7 @@ struct OSTrackMutex {
/** @return true if locking succeeded */ /** @return true if locking succeeded */
bool try_lock() UNIV_NOTHROW bool try_lock() UNIV_NOTHROW
{ {
ut_ad(innodb_calling_exit || !m_freed); ut_ad(!m_freed);
bool locked = m_mutex.try_lock(); bool locked = m_mutex.try_lock();
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -33,11 +34,6 @@ Created 9/5/1995 Heikki Tuuri ...@@ -33,11 +34,6 @@ Created 9/5/1995 Heikki Tuuri
#include "ut0new.h" #include "ut0new.h"
#include "ut0counter.h" #include "ut0counter.h"
#if defined(UNIV_DEBUG) && !defined(UNIV_INNOCHECKSUM)
/** Set when InnoDB has invoked exit(). */
extern bool innodb_calling_exit;
#endif /* UNIV_DEBUG && !UNIV_INNOCHECKSUM */
#ifdef _WIN32 #ifdef _WIN32
/** Native mutex */ /** Native mutex */
typedef CRITICAL_SECTION sys_mutex_t; typedef CRITICAL_SECTION sys_mutex_t;
...@@ -436,7 +432,7 @@ struct OSMutex { ...@@ -436,7 +432,7 @@ struct OSMutex {
void destroy() void destroy()
UNIV_NOTHROW UNIV_NOTHROW
{ {
ut_ad(innodb_calling_exit || !m_freed); ut_ad(!m_freed);
#ifdef _WIN32 #ifdef _WIN32
DeleteCriticalSection((LPCRITICAL_SECTION) &m_mutex); DeleteCriticalSection((LPCRITICAL_SECTION) &m_mutex);
#else #else
...@@ -458,7 +454,7 @@ struct OSMutex { ...@@ -458,7 +454,7 @@ struct OSMutex {
void exit() void exit()
UNIV_NOTHROW UNIV_NOTHROW
{ {
ut_ad(innodb_calling_exit || !m_freed); ut_ad(!m_freed);
#ifdef _WIN32 #ifdef _WIN32
LeaveCriticalSection(&m_mutex); LeaveCriticalSection(&m_mutex);
#else #else
...@@ -471,7 +467,7 @@ struct OSMutex { ...@@ -471,7 +467,7 @@ struct OSMutex {
void enter() void enter()
UNIV_NOTHROW UNIV_NOTHROW
{ {
ut_ad(innodb_calling_exit || !m_freed); ut_ad(!m_freed);
#ifdef _WIN32 #ifdef _WIN32
EnterCriticalSection((LPCRITICAL_SECTION) &m_mutex); EnterCriticalSection((LPCRITICAL_SECTION) &m_mutex);
#else #else
...@@ -484,7 +480,7 @@ struct OSMutex { ...@@ -484,7 +480,7 @@ struct OSMutex {
bool try_lock() bool try_lock()
UNIV_NOTHROW UNIV_NOTHROW
{ {
ut_ad(innodb_calling_exit || !m_freed); ut_ad(!m_freed);
#ifdef _WIN32 #ifdef _WIN32
return(TryEnterCriticalSection(&m_mutex) != 0); return(TryEnterCriticalSection(&m_mutex) != 0);
#else #else
......
...@@ -73,11 +73,6 @@ Created 10/21/1995 Heikki Tuuri ...@@ -73,11 +73,6 @@ Created 10/21/1995 Heikki Tuuri
# include <linux/falloc.h> # include <linux/falloc.h>
#endif /* HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE */ #endif /* HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE */
#ifdef UNIV_DEBUG
/** Set when InnoDB has invoked exit(). */
bool innodb_calling_exit;
#endif /* UNIV_DEBUG */
#if defined(UNIV_LINUX) && defined(HAVE_SYS_IOCTL_H) #if defined(UNIV_LINUX) && defined(HAVE_SYS_IOCTL_H)
# include <sys/ioctl.h> # include <sys/ioctl.h>
# ifndef DFS_IOCTL_ATOMIC_WRITE_SET # ifndef DFS_IOCTL_ATOMIC_WRITE_SET
......
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