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
ab316c36
Commit
ab316c36
authored
Oct 13, 2004
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: correct potential overflow in trx_purge()
parent
b4026126
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
innobase/trx/trx0purge.c
innobase/trx/trx0purge.c
+5
-2
No files found.
innobase/trx/trx0purge.c
View file @
ab316c36
...
...
@@ -1057,12 +1057,15 @@ trx_purge(void)
&&
!
UT_LIST_GET_LAST
(
trx_sys
->
view_list
))
{
float
ratio
=
(
float
)
trx_sys
->
rseg_history_len
/
srv_max_purge_lag
;
if
(
ratio
>
1
)
{
if
(
ratio
>
ULINT_MAX
/
10000
)
{
/* Avoid overflow: maximum delay is 4295 seconds */
srv_dml_needed_delay
=
ULINT_MAX
;
}
else
if
(
ratio
>
1
)
{
/* If the history list length exceeds the
innodb_max_purge_lag, the
data manipulation statements are delayed
by at least 5000 microseconds. */
srv_dml_needed_delay
=
(
ratio
-
.
5
)
*
10000
;
srv_dml_needed_delay
=
(
ulint
)
((
ratio
-
.
5
)
*
10000
)
;
}
}
...
...
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