Skip to content

Commit 7331b83

Browse files
committed
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.
1 parent ff0530e commit 7331b83

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

storage/innobase/include/ib0mutex.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved.
4+
Copyright (c) 2017, MariaDB Corporation. All Rights Reserved.
45
56
This program is free software; you can redistribute it and/or modify it under
67
the terms of the GNU General Public License as published by the Free Software
@@ -74,7 +75,7 @@ struct OSTrackMutex {
7475
void destroy() UNIV_NOTHROW
7576
{
7677
ut_ad(!m_locked);
77-
ut_ad(innodb_calling_exit || !m_freed);
78+
ut_ad(!m_freed);
7879

7980
m_mutex.destroy();
8081

@@ -86,7 +87,7 @@ struct OSTrackMutex {
8687
{
8788
ut_ad(m_locked);
8889
ut_d(m_locked = false);
89-
ut_ad(innodb_calling_exit || !m_freed);
90+
ut_ad(!m_freed);
9091

9192
m_mutex.exit();
9293
}
@@ -103,7 +104,7 @@ struct OSTrackMutex {
103104
uint32_t line)
104105
UNIV_NOTHROW
105106
{
106-
ut_ad(innodb_calling_exit || !m_freed);
107+
ut_ad(!m_freed);
107108

108109
m_mutex.enter();
109110

@@ -114,7 +115,7 @@ struct OSTrackMutex {
114115
/** @return true if locking succeeded */
115116
bool try_lock() UNIV_NOTHROW
116117
{
117-
ut_ad(innodb_calling_exit || !m_freed);
118+
ut_ad(!m_freed);
118119

119120
bool locked = m_mutex.try_lock();
120121

storage/innobase/include/sync0types.h

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
4+
Copyright (c) 2017, MariaDB Corporation. All Rights Reserved.
45
56
This program is free software; you can redistribute it and/or modify it under
67
the terms of the GNU General Public License as published by the Free Software
@@ -33,11 +34,6 @@ Created 9/5/1995 Heikki Tuuri
3334
#include "ut0new.h"
3435
#include "ut0counter.h"
3536

36-
#if defined(UNIV_DEBUG) && !defined(UNIV_INNOCHECKSUM)
37-
/** Set when InnoDB has invoked exit(). */
38-
extern bool innodb_calling_exit;
39-
#endif /* UNIV_DEBUG && !UNIV_INNOCHECKSUM */
40-
4137
#ifdef _WIN32
4238
/** Native mutex */
4339
typedef CRITICAL_SECTION sys_mutex_t;
@@ -436,7 +432,7 @@ struct OSMutex {
436432
void destroy()
437433
UNIV_NOTHROW
438434
{
439-
ut_ad(innodb_calling_exit || !m_freed);
435+
ut_ad(!m_freed);
440436
#ifdef _WIN32
441437
DeleteCriticalSection((LPCRITICAL_SECTION) &m_mutex);
442438
#else
@@ -458,7 +454,7 @@ struct OSMutex {
458454
void exit()
459455
UNIV_NOTHROW
460456
{
461-
ut_ad(innodb_calling_exit || !m_freed);
457+
ut_ad(!m_freed);
462458
#ifdef _WIN32
463459
LeaveCriticalSection(&m_mutex);
464460
#else
@@ -471,7 +467,7 @@ struct OSMutex {
471467
void enter()
472468
UNIV_NOTHROW
473469
{
474-
ut_ad(innodb_calling_exit || !m_freed);
470+
ut_ad(!m_freed);
475471
#ifdef _WIN32
476472
EnterCriticalSection((LPCRITICAL_SECTION) &m_mutex);
477473
#else
@@ -484,7 +480,7 @@ struct OSMutex {
484480
bool try_lock()
485481
UNIV_NOTHROW
486482
{
487-
ut_ad(innodb_calling_exit || !m_freed);
483+
ut_ad(!m_freed);
488484
#ifdef _WIN32
489485
return(TryEnterCriticalSection(&m_mutex) != 0);
490486
#else

storage/innobase/os/os0file.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ Created 10/21/1995 Heikki Tuuri
7373
# include <linux/falloc.h>
7474
#endif /* HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE */
7575

76-
#ifdef UNIV_DEBUG
77-
/** Set when InnoDB has invoked exit(). */
78-
bool innodb_calling_exit;
79-
#endif /* UNIV_DEBUG */
80-
8176
#if defined(UNIV_LINUX) && defined(HAVE_SYS_IOCTL_H)
8277
# include <sys/ioctl.h>
8378
# ifndef DFS_IOCTL_ATOMIC_WRITE_SET

0 commit comments

Comments
 (0)