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
4e99e67c
Commit
4e99e67c
authored
Nov 06, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 5.5 into 10.1
parents
5c3bbbd8
e23cb383
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
include/heap.h
include/heap.h
+1
-1
storage/heap/_check.c
storage/heap/_check.c
+13
-14
No files found.
include/heap.h
View file @
4e99e67c
...
...
@@ -246,7 +246,7 @@ int hp_panic(enum ha_panic_function flag);
int
heap_rkey
(
HP_INFO
*
info
,
uchar
*
record
,
int
inx
,
const
uchar
*
key
,
key_part_map
keypart_map
,
enum
ha_rkey_function
find_flag
);
extern
uchar
*
heap_find
(
HP_INFO
*
info
,
int
inx
,
const
uchar
*
key
);
extern
int
heap_check_heap
(
HP_INFO
*
info
,
my_bool
print_status
);
extern
int
heap_check_heap
(
const
HP_INFO
*
info
,
my_bool
print_status
);
extern
uchar
*
heap_position
(
HP_INFO
*
info
);
/* The following is for programs that uses the old HEAP interface where
...
...
storage/heap/_check.c
View file @
4e99e67c
...
...
@@ -18,10 +18,8 @@
#include "heapdef.h"
static
int
check_one_key
(
HP_KEYDEF
*
keydef
,
uint
keynr
,
ulong
records
,
ulong
blength
,
my_bool
print_status
);
static
int
check_one_rb_key
(
HP_INFO
*
info
,
uint
keynr
,
ulong
records
,
my_bool
print_status
);
static
int
check_one_key
(
HP_KEYDEF
*
,
uint
,
ulong
,
ulong
,
my_bool
);
static
int
check_one_rb_key
(
const
HP_INFO
*
,
uint
,
ulong
,
my_bool
);
/*
...
...
@@ -40,13 +38,13 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records,
1 error
*/
int
heap_check_heap
(
HP_INFO
*
info
,
my_bool
print_status
)
int
heap_check_heap
(
const
HP_INFO
*
info
,
my_bool
print_status
)
{
int
error
;
uint
key
;
ulong
records
=
0
,
deleted
=
0
,
pos
,
next_block
;
HP_SHARE
*
share
=
info
->
s
;
HP_INFO
save_info
=
*
info
;
/* Needed because scan_init */
uchar
*
current_ptr
=
info
->
current_ptr
;
DBUG_ENTER
(
"heap_check_heap"
);
for
(
error
=
key
=
0
;
key
<
share
->
keys
;
key
++
)
...
...
@@ -65,7 +63,7 @@ int heap_check_heap(HP_INFO *info, my_bool print_status)
{
if
(
pos
<
next_block
)
{
info
->
current_ptr
+=
share
->
block
.
recbuffer
;
current_ptr
+=
share
->
block
.
recbuffer
;
}
else
{
...
...
@@ -77,9 +75,9 @@ int heap_check_heap(HP_INFO *info, my_bool print_status)
break
;
/* End of file */
}
}
hp_find_record
(
info
,
pos
);
current_ptr
=
hp_find_block
(
&
share
->
block
,
pos
);
if
(
!
info
->
current_ptr
[
share
->
visible
])
if
(
!
current_ptr
[
share
->
visible
])
deleted
++
;
else
records
++
;
...
...
@@ -92,7 +90,6 @@ int heap_check_heap(HP_INFO *info, my_bool print_status)
deleted
,
(
ulong
)
share
->
deleted
));
error
=
1
;
}
*
info
=
save_info
;
DBUG_RETURN
(
error
);
}
...
...
@@ -165,7 +162,7 @@ static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records,
return
error
;
}
static
int
check_one_rb_key
(
HP_INFO
*
info
,
uint
keynr
,
ulong
records
,
static
int
check_one_rb_key
(
const
HP_INFO
*
info
,
uint
keynr
,
ulong
records
,
my_bool
print_status
)
{
HP_KEYDEF
*
keydef
=
info
->
s
->
keydef
+
keynr
;
...
...
@@ -174,9 +171,11 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records,
uchar
*
key
,
*
recpos
;
uint
key_length
;
uint
not_used
[
2
];
TREE_ELEMENT
**
last_pos
;
TREE_ELEMENT
*
parents
[
MAX_TREE_HEIGHT
+
1
];
if
((
key
=
tree_search_edge
(
&
keydef
->
rb_tree
,
info
->
parents
,
&
info
->
last_pos
,
offsetof
(
TREE_ELEMENT
,
left
))))
if
((
key
=
tree_search_edge
(
&
keydef
->
rb_tree
,
parents
,
&
last_pos
,
offsetof
(
TREE_ELEMENT
,
left
))))
{
do
{
...
...
@@ -191,7 +190,7 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records,
}
else
found
++
;
key
=
tree_search_next
(
&
keydef
->
rb_tree
,
&
info
->
last_pos
,
key
=
tree_search_next
(
&
keydef
->
rb_tree
,
&
last_pos
,
offsetof
(
TREE_ELEMENT
,
left
),
offsetof
(
TREE_ELEMENT
,
right
));
}
while
(
key
);
...
...
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