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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
9b848d9e
Commit
9b848d9e
authored
Oct 17, 2008
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a number of compiler issues and attempted a fix for
Windows compilation error.
parent
eeddb067
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
28 deletions
+30
-28
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+1
-2
storage/innobase/include/srv0srv.h
storage/innobase/include/srv0srv.h
+1
-5
storage/innobase/include/sync0rw.h
storage/innobase/include/sync0rw.h
+14
-0
storage/innobase/include/sync0rw.ic
storage/innobase/include/sync0rw.ic
+7
-5
storage/innobase/os/os0file.c
storage/innobase/os/os0file.c
+1
-3
storage/innobase/srv/srv0srv.c
storage/innobase/srv/srv0srv.c
+3
-10
storage/innobase/srv/srv0start.c
storage/innobase/srv/srv0start.c
+2
-2
storage/innobase/sync/sync0rw.c
storage/innobase/sync/sync0rw.c
+1
-1
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
9b848d9e
...
@@ -6833,8 +6833,7 @@ innodb_show_status(
...
@@ -6833,8 +6833,7 @@ innodb_show_status(
mutex_enter_noninline
(
&
srv_monitor_file_mutex
);
mutex_enter_noninline
(
&
srv_monitor_file_mutex
);
rewind
(
srv_monitor_file
);
rewind
(
srv_monitor_file
);
srv_printf_innodb_monitor
(
srv_monitor_file
,
srv_printf_innodb_monitor
(
srv_monitor_file
);
&
trx_list_start
,
&
trx_list_end
);
flen
=
ftell
(
srv_monitor_file
);
flen
=
ftell
(
srv_monitor_file
);
os_file_set_eof
(
srv_monitor_file
);
os_file_set_eof
(
srv_monitor_file
);
...
...
storage/innobase/include/srv0srv.h
View file @
9b848d9e
...
@@ -463,11 +463,7 @@ Outputs to a file the output of the InnoDB Monitor. */
...
@@ -463,11 +463,7 @@ Outputs to a file the output of the InnoDB Monitor. */
void
void
srv_printf_innodb_monitor
(
srv_printf_innodb_monitor
(
/*======================*/
/*======================*/
FILE
*
file
,
/* in: output stream */
FILE
*
file
);
/* in: output stream */
ulint
*
trx_start
,
/* out: file position of the start of
the list of active transactions */
ulint
*
trx_end
);
/* out: file position of the end of
the list of active transactions */
/**********************************************************************
/**********************************************************************
Function to pass InnoDB status variables to MySQL */
Function to pass InnoDB status variables to MySQL */
...
...
storage/innobase/include/sync0rw.h
View file @
9b848d9e
...
@@ -117,6 +117,20 @@ rw_lock_validate(
...
@@ -117,6 +117,20 @@ rw_lock_validate(
/*=============*/
/*=============*/
rw_lock_t
*
lock
);
rw_lock_t
*
lock
);
#endif
/* UNIV_DEBUG */
#endif
/* UNIV_DEBUG */
/**********************************************************************
Low-level function which tries to lock an rw-lock in s-mode. Performs no
spinning. */
UNIV_INLINE
ibool
rw_lock_s_lock_low
(
/*===============*/
/* out: TRUE if success */
rw_lock_t
*
lock
,
/* in: pointer to rw-lock */
ulint
pass
,
/* in: pass value; != 0, if the lock will be
passed to another thread to unlock */
const
char
*
file_name
,
/* in: file name where lock requested */
ulint
line
);
/* in: line where requested */
/******************************************************************
/******************************************************************
NOTE! The following macros should be used in rw s-locking, not the
NOTE! The following macros should be used in rw s-locking, not the
corresponding function. */
corresponding function. */
...
...
storage/innobase/include/sync0rw.ic
View file @
9b848d9e
...
@@ -474,13 +474,15 @@ rw_lock_x_unlock_func(
...
@@ -474,13 +474,15 @@ rw_lock_x_unlock_func(
#endif
#endif
)
)
{
{
os_thread_id_t local_writer_thread;
ut_ad((lock->lock_word % X_LOCK_DECR) == 0);
ut_ad((lock->lock_word % X_LOCK_DECR) == 0);
/* Must reset writer_thread while we still have the lock.
/*
Must reset writer_thread while we still have the lock.
If we are not the last unlocker, we correct it later in the function,
If we are not the last unlocker, we correct it later in the function,
which is harmless since we still hold the lock. */
which is harmless since we still hold the lock.
/* TODO: are there any risks of a thread id == -1 on any platform? */
TODO: are there any risks of a thread id == -1 on any platform?
os_thread_id_t local_writer_thread;
*/
local_writer_thread = lock->writer_thread;
local_writer_thread = lock->writer_thread;
lock->writer_thread = -1;
lock->writer_thread = -1;
...
...
storage/innobase/os/os0file.c
View file @
9b848d9e
...
@@ -3432,8 +3432,6 @@ void
...
@@ -3432,8 +3432,6 @@ void
os_aio_simulated_wake_handler_threads
(
void
)
os_aio_simulated_wake_handler_threads
(
void
)
/*=======================================*/
/*=======================================*/
{
{
ulint
i
;
if
(
os_aio_use_native_aio
)
{
if
(
os_aio_use_native_aio
)
{
/* We do not use simulated aio: do nothing */
/* We do not use simulated aio: do nothing */
...
@@ -4405,7 +4403,7 @@ loop:
...
@@ -4405,7 +4403,7 @@ loop:
putc
(
'\n'
,
file
);
putc
(
'\n'
,
file
);
fprintf
(
file
,
fprintf
(
file
,
"Summary of background IO slot status: %lu issued, "
"Summary of background IO slot status: %lu issued, "
"%lu done, %lu claimed, sleep set %
d
\n
"
,
"%lu done, %lu claimed, sleep set %
u
\n
"
,
num_issued
,
num_done
,
num_claimed
,
num_issued
,
num_done
,
num_claimed
,
os_aio_recommend_sleep_for_read_threads
);
os_aio_recommend_sleep_for_read_threads
);
...
...
storage/innobase/srv/srv0srv.c
View file @
9b848d9e
...
@@ -664,8 +664,6 @@ are indexed by the type of the thread. */
...
@@ -664,8 +664,6 @@ are indexed by the type of the thread. */
ulint
srv_n_threads_active
[
SRV_MASTER
+
1
];
ulint
srv_n_threads_active
[
SRV_MASTER
+
1
];
ulint
srv_n_threads
[
SRV_MASTER
+
1
];
ulint
srv_n_threads
[
SRV_MASTER
+
1
];
static
void
srv_reset_free_tickets
(
trx_t
*
trx
);
static
void
time_spin_delay
()
static
void
time_spin_delay
()
{
{
ulint
start_sec
,
end_sec
;
ulint
start_sec
,
end_sec
;
...
@@ -1697,11 +1695,7 @@ Outputs to a file the output of the InnoDB Monitor. */
...
@@ -1697,11 +1695,7 @@ Outputs to a file the output of the InnoDB Monitor. */
void
void
srv_printf_innodb_monitor
(
srv_printf_innodb_monitor
(
/*======================*/
/*======================*/
FILE
*
file
,
/* in: output stream */
FILE
*
file
)
/* in: output stream */
ulint
*
trx_start
,
/* out: file position of the start of
the list of active transactions */
ulint
*
trx_end
)
/* out: file position of the end of
the list of active transactions */
{
{
double
time_elapsed
;
double
time_elapsed
;
time_t
current_time
;
time_t
current_time
;
...
@@ -1994,14 +1988,13 @@ loop:
...
@@ -1994,14 +1988,13 @@ loop:
last_monitor_time
=
time
(
NULL
);
last_monitor_time
=
time
(
NULL
);
if
(
srv_print_innodb_monitor
)
{
if
(
srv_print_innodb_monitor
)
{
srv_printf_innodb_monitor
(
stderr
,
NULL
,
NULL
);
srv_printf_innodb_monitor
(
stderr
);
}
}
if
(
srv_innodb_status
)
{
if
(
srv_innodb_status
)
{
mutex_enter
(
&
srv_monitor_file_mutex
);
mutex_enter
(
&
srv_monitor_file_mutex
);
rewind
(
srv_monitor_file
);
rewind
(
srv_monitor_file
);
srv_printf_innodb_monitor
(
srv_monitor_file
,
NULL
,
srv_printf_innodb_monitor
(
srv_monitor_file
);
NULL
);
os_file_set_eof
(
srv_monitor_file
);
os_file_set_eof
(
srv_monitor_file
);
mutex_exit
(
&
srv_monitor_file_mutex
);
mutex_exit
(
&
srv_monitor_file_mutex
);
}
}
...
...
storage/innobase/srv/srv0start.c
View file @
9b848d9e
...
@@ -1251,7 +1251,7 @@ innobase_start_or_create_for_mysql(void)
...
@@ -1251,7 +1251,7 @@ innobase_start_or_create_for_mysql(void)
/* Restrict the maximum number of file i/o threads */
/* Restrict the maximum number of file i/o threads */
if
((
srv_n_read_io_threads
+
srv_n_write_io_threads
)
>
SRV_MAX_N_IO_THREADS
)
{
if
((
srv_n_read_io_threads
+
srv_n_write_io_threads
)
>
SRV_MAX_N_IO_THREADS
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"InnoDB: requested too many read(%
d) or write(%d
) IO threads, max is %d
\n
"
,
"InnoDB: requested too many read(%
u) or write(%u
) IO threads, max is %d
\n
"
,
srv_n_read_io_threads
,
srv_n_write_io_threads
,
SRV_MAX_N_IO_THREADS
);
srv_n_read_io_threads
,
srv_n_write_io_threads
,
SRV_MAX_N_IO_THREADS
);
return
(
DB_ERROR
);
return
(
DB_ERROR
);
}
}
...
@@ -1272,7 +1272,7 @@ innobase_start_or_create_for_mysql(void)
...
@@ -1272,7 +1272,7 @@ innobase_start_or_create_for_mysql(void)
if
(
n_threads
>
SRV_MAX_N_IO_THREADS
)
{
if
(
n_threads
>
SRV_MAX_N_IO_THREADS
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"InnoDB: requested too many IO threads(%
d
), max is %d
\n
"
,
"InnoDB: requested too many IO threads(%
u
), max is %d
\n
"
,
n_threads
,
SRV_MAX_N_IO_THREADS
);
n_threads
,
SRV_MAX_N_IO_THREADS
);
return
(
DB_ERROR
);
return
(
DB_ERROR
);
}
}
...
...
storage/innobase/sync/sync0rw.c
View file @
9b848d9e
...
@@ -417,7 +417,7 @@ rw_lock_x_lock_move_ownership(
...
@@ -417,7 +417,7 @@ rw_lock_x_lock_move_ownership(
os_thread_id_t
local_writer_thread
=
lock
->
writer_thread
;
os_thread_id_t
local_writer_thread
=
lock
->
writer_thread
;
os_thread_id_t
new_writer_thread
=
os_thread_get_curr_id
();
os_thread_id_t
new_writer_thread
=
os_thread_get_curr_id
();
while
(
TRUE
)
{
while
(
TRUE
)
{
if
(
local_writer_thread
!=
-
1
)
{
if
(
(
int
)
local_writer_thread
!=
-
1
)
{
if
(
os_compare_and_swap
(
if
(
os_compare_and_swap
(
&
(
lock
->
writer_thread
),
&
(
lock
->
writer_thread
),
local_writer_thread
,
local_writer_thread
,
...
...
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