Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7d3e633e
Commit
7d3e633e
authored
Apr 09, 2004
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ha_innodb.cc, sync0sync.h, sync0sync.c:
Use only noninlined InnoDB functions in ha_innodb.cc
parent
a4a703ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
3 deletions
+46
-3
innobase/include/sync0sync.h
innobase/include/sync0sync.h
+16
-0
innobase/sync/sync0sync.c
innobase/sync/sync0sync.c
+24
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+6
-3
No files found.
innobase/include/sync0sync.h
View file @
7d3e633e
...
...
@@ -65,6 +65,15 @@ NOTE! The following macro should be used in mutex locking, not the
corresponding function. */
#define mutex_enter(M) mutex_enter_func((M), IB__FILE__, __LINE__)
/**********************************************************************
A noninlined function that reserves a mutex. In ha_innodb.cc we have disabled
inlining of InnoDB functions, and no inlined functions should be called from
there. That is why we need to duplicate the inlined function here. */
void
mutex_enter_noninline
(
/*==================*/
mutex_t
*
mutex
);
/* in: mutex */
/******************************************************************
NOTE! The following macro should be used in mutex locking, not the
corresponding function. */
...
...
@@ -105,6 +114,13 @@ mutex_exit(
/*=======*/
mutex_t
*
mutex
);
/* in: pointer to mutex */
/**********************************************************************
Releases a mutex. */
void
mutex_exit_noninline
(
/*=================*/
mutex_t
*
mutex
);
/* in: mutex */
/**********************************************************************
Returns TRUE if no mutex or rw-lock is currently locked.
Works only in the debug version. */
...
...
innobase/sync/sync0sync.c
View file @
7d3e633e
...
...
@@ -167,6 +167,30 @@ struct sync_level_struct{
ulint
level
;
/* level of the latch in the latching order */
};
/**********************************************************************
A noninlined function that reserves a mutex. In ha_innodb.cc we have disabled
inlining of InnoDB functions, and no inlined functions should be called from
there. That is why we need to duplicate the inlined function here. */
void
mutex_enter_noninline
(
/*==================*/
mutex_t
*
mutex
)
/* in: mutex */
{
mutex_enter
(
mutex
);
}
/**********************************************************************
Releases a mutex. */
void
mutex_exit_noninline
(
/*=================*/
mutex_t
*
mutex
)
/* in: mutex */
{
mutex_exit
(
mutex
);
}
/**********************************************************************
Creates, or rather, initializes a mutex object in a specified memory
location (which must be appropriately aligned). The mutex is initialized
...
...
sql/ha_innodb.cc
View file @
7d3e633e
...
...
@@ -15,7 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* This file defines the InnoDB handler: the interface between MySQL and
InnoDB */
InnoDB
NOTE: You can only use noninlined InnoDB functions in this file, because we
have disables the InnoDB inlining in this file. */
#ifdef __GNUC__
#pragma implementation // gcc: Class implementation
...
...
@@ -64,6 +66,7 @@ extern "C" {
#include "../innobase/include/btr0cur.h"
#include "../innobase/include/btr0btr.h"
#include "../innobase/include/fsp0fsp.h"
#include "../innobase/include/sync0sync.h"
}
#define HA_INNOBASE_ROWS_IN_TABLE 10000
/* to get optimization right */
...
...
@@ -4629,7 +4632,7 @@ innodb_show_status(
long
flen
;
char
*
str
;
mutex_enter
(
&
srv_monitor_file_mutex
);
mutex_enter
_noninline
(
&
srv_monitor_file_mutex
);
rewind
(
srv_monitor_file
);
srv_printf_innodb_monitor
(
srv_monitor_file
);
flen
=
ftell
(
srv_monitor_file
);
...
...
@@ -4650,7 +4653,7 @@ innodb_show_status(
str
[
flen
]
=
0
;
}
mutex_exit
(
&
srv_monitor_file_mutex
);
mutex_exit
_noninline
(
&
srv_monitor_file_mutex
);
List
<
Item
>
field_list
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment