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
eb42421e
Commit
eb42421e
authored
Jun 22, 2005
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: Replace for loops with memset() where possible.
parent
3427c330
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
19 deletions
+6
-19
innobase/btr/btr0cur.c
innobase/btr/btr0cur.c
+1
-3
innobase/buf/buf0buf.c
innobase/buf/buf0buf.c
+0
-4
innobase/os/os0file.c
innobase/os/os0file.c
+1
-4
innobase/page/page0page.c
innobase/page/page0page.c
+1
-3
innobase/trx/trx0rec.c
innobase/trx/trx0rec.c
+3
-5
No files found.
innobase/btr/btr0cur.c
View file @
eb42421e
...
...
@@ -2847,9 +2847,7 @@ btr_estimate_number_of_different_key_vals(
n_diff
=
mem_alloc
((
n_cols
+
1
)
*
sizeof
(
ib_longlong
));
for
(
j
=
0
;
j
<=
n_cols
;
j
++
)
{
n_diff
[
j
]
=
0
;
}
memset
(
n_diff
,
0
,
(
n_cols
+
1
)
*
sizeof
(
ib_longlong
));
/* We sample some pages in the index to get an estimate */
...
...
innobase/buf/buf0buf.c
View file @
eb42421e
...
...
@@ -2101,10 +2101,6 @@ buf_print(void)
n_found
=
0
;
for
(
i
=
0
;
i
<
size
;
i
++
)
{
counts
[
i
]
=
0
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
frame
=
buf_pool_get_nth_block
(
buf_pool
,
i
)
->
frame
;
...
...
innobase/os/os0file.c
View file @
eb42421e
...
...
@@ -1672,7 +1672,6 @@ os_file_set_size(
ibool
ret
;
byte
*
buf
;
byte
*
buf2
;
ulint
i
;
ut_a
(
size
==
(
size
&
0xFFFFFFFF
));
...
...
@@ -1685,9 +1684,7 @@ os_file_set_size(
buf
=
ut_align
(
buf2
,
UNIV_PAGE_SIZE
);
/* Write buffer full of zeros */
for
(
i
=
0
;
i
<
UNIV_PAGE_SIZE
*
512
;
i
++
)
{
buf
[
i
]
=
'\0'
;
}
memset
(
buf
,
0
,
UNIV_PAGE_SIZE
*
512
);
offset
=
0
;
low
=
(
ib_longlong
)
size
+
(((
ib_longlong
)
size_high
)
<<
32
);
...
...
innobase/page/page0page.c
View file @
eb42421e
...
...
@@ -1755,9 +1755,7 @@ page_validate(
records in the page record heap do not overlap */
buf
=
mem_heap_alloc
(
heap
,
UNIV_PAGE_SIZE
);
for
(
i
=
0
;
i
<
UNIV_PAGE_SIZE
;
i
++
)
{
buf
[
i
]
=
0
;
}
memset
(
buf
,
0
,
UNIV_PAGE_SIZE
);
/* Check first that the record heap and the directory do not
overlap. */
...
...
innobase/trx/trx0rec.c
View file @
eb42421e
...
...
@@ -941,13 +941,11 @@ trx_undo_erase_page_end(
mtr_t
*
mtr
)
/* in: mtr */
{
ulint
first_free
;
ulint
i
;
first_free
=
mach_read_from_2
(
undo_page
+
TRX_UNDO_PAGE_HDR
+
TRX_UNDO_PAGE_FREE
);
for
(
i
=
first_free
;
i
<
UNIV_PAGE_SIZE
-
FIL_PAGE_DATA_END
;
i
++
)
{
undo_page
[
i
]
=
0xFF
;
}
memset
(
undo_page
+
first_free
,
0xff
,
(
UNIV_PAGE_SIZE
-
FIL_PAGE_DATA_END
)
-
first_free
);
mlog_write_initial_log_record
(
undo_page
,
MLOG_UNDO_ERASE_END
,
mtr
);
}
...
...
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