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
391e60b2
Commit
391e60b2
authored
Aug 03, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix -Wclass-memaccess warnings in InnoDB
parent
814ae57d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
8 deletions
+38
-8
storage/innobase/buf/buf0buf.cc
storage/innobase/buf/buf0buf.cc
+2
-2
storage/innobase/gis/gis0rtree.cc
storage/innobase/gis/gis0rtree.cc
+2
-2
storage/innobase/gis/gis0sea.cc
storage/innobase/gis/gis0sea.cc
+1
-1
storage/innobase/include/btr0cur.h
storage/innobase/include/btr0cur.h
+20
-0
storage/innobase/include/btr0pcur.h
storage/innobase/include/btr0pcur.h
+12
-0
storage/innobase/row/row0uins.cc
storage/innobase/row/row0uins.cc
+1
-3
No files found.
storage/innobase/buf/buf0buf.cc
View file @
391e60b2
...
...
@@ -2214,8 +2214,8 @@ buf_page_realloc(
if
(
buf_page_can_relocate
(
&
block
->
page
))
{
mutex_enter
(
&
new_block
->
mutex
);
memcpy
(
new_block
->
frame
,
block
->
frame
,
UNIV_PAGE_SIZE
);
memcpy
(
&
new_block
->
page
,
&
block
->
page
,
sizeof
block
->
page
);
memcpy
(
new_block
->
frame
,
block
->
frame
,
srv_page_size
);
new
(
&
new_block
->
page
)
buf_page_t
(
block
->
page
);
/* relocate LRU list */
ut_ad
(
block
->
page
.
in_LRU_list
);
...
...
storage/innobase/gis/gis0rtree.cc
View file @
391e60b2
...
...
@@ -662,7 +662,7 @@ rtr_adjust_upper_level(
/* Create a memory heap where the data tuple is stored */
heap
=
mem_heap_create
(
1024
);
memset
(
&
cursor
,
0
,
sizeof
(
cursor
)
);
cursor
.
init
(
);
cursor
.
thr
=
sea_cur
->
thr
;
...
...
@@ -1379,7 +1379,7 @@ rtr_ins_enlarge_mbr(
rtr_page_cal_mbr
(
index
,
block
,
&
new_mbr
,
heap
);
/* Get father block. */
memset
(
&
cursor
,
0
,
sizeof
(
cursor
)
);
cursor
.
init
(
);
offsets
=
rtr_page_get_father_block
(
NULL
,
heap
,
index
,
block
,
mtr
,
btr_cur
,
&
cursor
);
...
...
storage/innobase/gis/gis0sea.cc
View file @
391e60b2
...
...
@@ -1548,7 +1548,7 @@ rtr_copy_buf(
will be copied. It is also undefined what will happen with the
newly memcpy()ed mutex if the source mutex was acquired by
(another) thread while it was copied. */
memcpy
(
&
matches
->
block
.
page
,
&
block
->
page
,
sizeof
(
buf_page_t
)
);
new
(
&
matches
->
block
.
page
)
buf_page_t
(
block
->
page
);
matches
->
block
.
frame
=
block
->
frame
;
matches
->
block
.
unzip_LRU
=
block
->
unzip_LRU
;
...
...
storage/innobase/include/btr0cur.h
View file @
391e60b2
...
...
@@ -926,6 +926,26 @@ struct btr_cur_t {
rtr_info_t
*
rtr_info
;
/*!< rtree search info */
btr_cur_t
()
:
thr
(
NULL
),
rtr_info
(
NULL
)
{}
/* default values */
/** Zero-initialize all fields */
void
init
()
{
index
=
NULL
;
memset
(
&
page_cur
,
0
,
sizeof
page_cur
);
purge_node
=
NULL
;
left_block
=
NULL
;
thr
=
NULL
;
flag
=
btr_cur_method
(
0
);
tree_height
=
0
;
up_match
=
0
;
up_bytes
=
0
;
low_match
=
0
;
low_bytes
=
0
;
n_fields
=
0
;
n_bytes
=
0
;
fold
=
0
;
path_arr
=
NULL
;
rtr_info
=
NULL
;
}
};
/******************************************************//**
...
...
storage/innobase/include/btr0pcur.h
View file @
391e60b2
...
...
@@ -543,6 +543,18 @@ struct btr_pcur_t{
/** old_rec_buf size if old_rec_buf is not NULL */
ulint
buf_size
;
btr_pcur_t
()
:
btr_cur
(),
latch_mode
(
0
),
old_stored
(
false
),
old_rec
(
NULL
),
old_n_fields
(
0
),
rel_pos
(
btr_pcur_pos_t
(
0
)),
block_when_stored
(
NULL
),
modify_clock
(
0
),
withdraw_clock
(
0
),
pos_state
(
BTR_PCUR_NOT_POSITIONED
),
search_mode
(
PAGE_CUR_UNSUPP
),
trx_if_known
(
NULL
),
old_rec_buf
(
NULL
),
buf_size
(
0
)
{
btr_cur
.
init
();
}
/** Return the index of this persistent cursor */
dict_index_t
*
index
()
const
{
return
(
btr_cur
.
index
);
}
};
...
...
storage/innobase/row/row0uins.cc
View file @
391e60b2
/*****************************************************************************
Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation.
Copyright (c) 2017,
2018,
MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -202,8 +202,6 @@ row_undo_ins_remove_sec_low(
enum
row_search_result
search_result
;
const
bool
modify_leaf
=
mode
==
BTR_MODIFY_LEAF
;
memset
(
&
pcur
,
0
,
sizeof
(
pcur
));
row_mtr_start
(
&
mtr
,
index
,
!
modify_leaf
);
if
(
modify_leaf
)
{
...
...
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