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
a5fab97c
Commit
a5fab97c
authored
Jan 05, 2005
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: Fix compiler warnings and some bad formatting introduced
in ChangeSet@1.1721.48.1
parent
7422b235
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
38 deletions
+44
-38
innobase/include/ut0ut.h
innobase/include/ut0ut.h
+8
-0
innobase/srv/srv0srv.c
innobase/srv/srv0srv.c
+26
-28
innobase/sync/sync0sync.c
innobase/sync/sync0sync.c
+1
-1
innobase/ut/ut0ut.c
innobase/ut/ut0ut.c
+9
-9
No files found.
innobase/include/ut0ut.h
View file @
a5fab97c
...
...
@@ -139,6 +139,14 @@ ib_time_t
ut_time
(
void
);
/*=========*/
/**************************************************************
Returns system time. */
void
ut_usectime
(
/*========*/
ulint
*
sec
,
/* out: seconds since the Epoch */
ulint
*
ms
);
/* out: microseconds since the Epoch+*sec */
/**************************************************************
Returns the difference of two times in seconds. */
double
...
...
innobase/srv/srv0srv.c
View file @
a5fab97c
...
...
@@ -346,10 +346,10 @@ static ulint srv_n_rows_updated_old = 0;
static
ulint
srv_n_rows_deleted_old
=
0
;
static
ulint
srv_n_rows_read_old
=
0
;
ulint
srv_n_lock_wait_count
=
0
;
ulint
srv_n_lock_wait_current_count
=
0
;
ib_longlong
srv_n_lock_wait_time
=
0
;
ulint
srv_n_lock_max_wait_time
=
0
;
ulint
srv_n_lock_wait_count
=
0
;
ulint
srv_n_lock_wait_current_count
=
0
;
ib_longlong
srv_n_lock_wait_time
=
0
;
ulint
srv_n_lock_max_wait_time
=
0
;
/*
...
...
@@ -1384,10 +1384,11 @@ srv_suspend_mysql_thread(
trx_t
*
trx
;
ibool
had_dict_lock
=
FALSE
;
ibool
was_declared_inside_innodb
=
FALSE
;
ib_longlong
start_time
,
finish_time
;
ulint
diff_time
;
ulint
sec
;
ulint
ms
;
ib_longlong
start_time
=
0
;
ib_longlong
finish_time
;
ulint
diff_time
;
ulint
sec
;
ulint
ms
;
#ifdef UNIV_SYNC_DEBUG
ut_ad
(
!
mutex_own
(
&
kernel_mutex
));
...
...
@@ -1430,15 +1431,14 @@ srv_suspend_mysql_thread(
os_event_reset
(
event
);
slot
->
suspend_time
=
ut_time
();
if
(
thr
->
lock_state
==
QUE_THR_LOCK_ROW
)
{
srv_n_lock_wait_count
++
;
srv_n_lock_wait_current_count
++
;
ut_usectime
(
&
sec
,
&
ms
);
start_time
=
(
ib_longlong
)
sec
*
1000000
+
ms
;
if
(
thr
->
lock_state
==
QUE_THR_LOCK_ROW
)
{
srv_n_lock_wait_count
++
;
srv_n_lock_wait_current_count
++
;
}
ut_usectime
(
&
sec
,
&
ms
);
start_time
=
(
ib_longlong
)
sec
*
1000000
+
ms
;
}
/* Wake the lock timeout monitor thread, if it is suspended */
os_event_set
(
srv_lock_timeout_thread_event
);
...
...
@@ -1490,20 +1490,18 @@ srv_suspend_mysql_thread(
wait_time
=
ut_difftime
(
ut_time
(),
slot
->
suspend_time
);
if
(
thr
->
lock_state
==
QUE_THR_LOCK_ROW
)
{
ut_usectime
(
&
sec
,
&
ms
);
finish_time
=
(
ib_longlong
)
sec
*
1000000
+
ms
;
diff_time
=
finish_time
-
start_time
;
if
(
thr
->
lock_state
==
QUE_THR_LOCK_ROW
)
{
ut_usectime
(
&
sec
,
&
ms
);
finish_time
=
(
ib_longlong
)
sec
*
1000000
+
ms
;
diff_time
=
finish_time
-
start_time
;
srv_n_lock_wait_current_count
--
;
srv_n_lock_wait_time
=
srv_n_lock_wait_time
+
diff_time
;
if
(
diff_time
>
srv_n_lock_max_wait_time
)
{
srv_n_lock_max_wait_time
=
diff_time
;
}
}
srv_n_lock_wait_current_count
--
;
srv_n_lock_wait_time
=
srv_n_lock_wait_time
+
diff_time
;
if
(
diff_time
>
srv_n_lock_max_wait_time
)
{
srv_n_lock_max_wait_time
=
diff_time
;
}
}
if
(
trx
->
was_chosen_as_deadlock_victim
)
{
...
...
innobase/sync/sync0sync.c
View file @
a5fab97c
...
...
@@ -368,7 +368,7 @@ mutex_spin_wait(
{
ulint
index
;
/* index of the reserved wait cell */
ulint
i
;
/* spin round count */
ib_longlong
lstart_time
,
lfinish_time
;
/* for timing os_wait */
ib_longlong
lstart_time
=
0
,
lfinish_time
;
/* for timing os_wait */
ulint
ltime_diff
;
ulint
sec
;
ulint
ms
;
...
...
innobase/ut/ut0ut.c
View file @
a5fab97c
...
...
@@ -74,18 +74,18 @@ ut_time(void)
}
/**************************************************************
Returns system time. We do not specify the format of the time returned:
the only way to manipulate it is to use the function ut_difftime. */
Returns system time. */
void
ut_usectime
(
ulint
*
sec
,
ulint
*
ms
)
/*=========*/
ut_usectime
(
/*========*/
ulint
*
sec
,
/* out: seconds since the Epoch */
ulint
*
ms
)
/* out: microseconds since the Epoch+*sec */
{
struct
timeval
tv
;
gettimeofday
(
&
tv
,
NULL
);
*
sec
=
(
ulint
)
tv
.
tv_sec
;
*
ms
=
(
ulint
)
tv
.
tv_usec
;
return
;
struct
timeval
tv
;
gettimeofday
(
&
tv
,
NULL
);
*
sec
=
(
ulint
)
tv
.
tv_sec
;
*
ms
=
(
ulint
)
tv
.
tv_usec
;
}
/**************************************************************
...
...
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