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
ac8a79b9
Commit
ac8a79b9
authored
Oct 04, 2010
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
d4f2e7a9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
sql/multi_range_read.cc
sql/multi_range_read.cc
+2
-12
sql/multi_range_read.h
sql/multi_range_read.h
+0
-2
No files found.
sql/multi_range_read.cc
View file @
ac8a79b9
...
@@ -373,7 +373,6 @@ int DsMrr_impl::dsmrr_init(handler *h_arg, RANGE_SEQ_IF *seq_funcs,
...
@@ -373,7 +373,6 @@ int DsMrr_impl::dsmrr_init(handler *h_arg, RANGE_SEQ_IF *seq_funcs,
if
(
do_sort_keys
)
if
(
do_sort_keys
)
{
{
know_key_tuple_params
=
FALSE
;
know_key_tuple_params
=
FALSE
;
//in_index_range= FALSE;
h
->
mrr_iter
=
seq_funcs
->
init
(
seq_init_param
,
n_ranges
,
mode
);
h
->
mrr_iter
=
seq_funcs
->
init
(
seq_init_param
,
n_ranges
,
mode
);
h
->
mrr_funcs
=
*
seq_funcs
;
h
->
mrr_funcs
=
*
seq_funcs
;
keyno
=
(
h
->
inited
==
handler
::
INDEX
)
?
h
->
active_index
:
h2
->
active_index
;
keyno
=
(
h
->
inited
==
handler
::
INDEX
)
?
h
->
active_index
:
h2
->
active_index
;
...
@@ -771,7 +770,6 @@ void DsMrr_impl::dsmrr_fill_key_buffer()
...
@@ -771,7 +770,6 @@ void DsMrr_impl::dsmrr_fill_key_buffer()
*/
*/
rowid_buffer
.
set_buffer_space
(
full_buf
,
rowid_buffer_end
);
rowid_buffer
.
set_buffer_space
(
full_buf
,
rowid_buffer_end
);
key_buffer
=
&
backward_key_buf
;
key_buffer
=
&
backward_key_buf
;
//identical_key_it= &backward_key_it;
key_buffer
->
set_buffer_space
(
rowid_buffer_end
,
full_buf_end
);
key_buffer
->
set_buffer_space
(
rowid_buffer_end
,
full_buf_end
);
}
}
key_buffer
->
reset
();
key_buffer
->
reset
();
...
@@ -815,9 +813,6 @@ void DsMrr_impl::dsmrr_fill_key_buffer()
...
@@ -815,9 +813,6 @@ void DsMrr_impl::dsmrr_fill_key_buffer()
is_mrr_assoc
?
(
uchar
**
)
&
cur_range_info
:
NULL
,
is_mrr_assoc
?
(
uchar
**
)
&
cur_range_info
:
NULL
,
sizeof
(
void
*
));
sizeof
(
void
*
));
//last_identical_key_ptr= NULL;
//in_identical_keys_range= FALSE;
//index_scan_state= GET_NEXT_RANGE;
scanning_key_val_iter
=
FALSE
;
scanning_key_val_iter
=
FALSE
;
index_scan_eof
=
FALSE
;
index_scan_eof
=
FALSE
;
...
@@ -857,7 +852,6 @@ bool Key_value_records_iterator::init(DsMrr_impl *dsmrr_arg)
...
@@ -857,7 +852,6 @@ bool Key_value_records_iterator::init(DsMrr_impl *dsmrr_arg)
dsmrr
->
cur_index_tuple
=
*
((
uchar
**
)
dsmrr
->
cur_index_tuple
);
dsmrr
->
cur_index_tuple
=
*
((
uchar
**
)
dsmrr
->
cur_index_tuple
);
/* Check out how many more identical keys are following */
/* Check out how many more identical keys are following */
//char *save_cur_range_info= cur_range_info;
uchar
*
save_cur_index_tuple
=
dsmrr
->
cur_index_tuple
;
uchar
*
save_cur_index_tuple
=
dsmrr
->
cur_index_tuple
;
while
(
!
identical_key_it
.
read
())
while
(
!
identical_key_it
.
read
())
{
{
...
@@ -867,7 +861,6 @@ bool Key_value_records_iterator::init(DsMrr_impl *dsmrr_arg)
...
@@ -867,7 +861,6 @@ bool Key_value_records_iterator::init(DsMrr_impl *dsmrr_arg)
}
}
identical_key_it
.
init
(
dsmrr
->
key_buffer
);
identical_key_it
.
init
(
dsmrr
->
key_buffer
);
dsmrr
->
cur_index_tuple
=
save_cur_index_tuple
;
dsmrr
->
cur_index_tuple
=
save_cur_index_tuple
;
//cur_range_info= save_cur_range_info;
res
=
file
->
ha_index_read_map
(
dsmrr
->
table
->
record
[
0
],
res
=
file
->
ha_index_read_map
(
dsmrr
->
table
->
record
[
0
],
dsmrr
->
cur_index_tuple
,
dsmrr
->
cur_index_tuple
,
dsmrr
->
key_tuple_map
,
dsmrr
->
key_tuple_map
,
...
@@ -918,8 +911,6 @@ void Key_value_records_iterator::close()
...
@@ -918,8 +911,6 @@ void Key_value_records_iterator::close()
(
dsmrr
->
cur_index_tuple
!=
last_identical_key_ptr
))
{}
(
dsmrr
->
cur_index_tuple
!=
last_identical_key_ptr
))
{}
}
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
/**
/**
DS-MRR/CPK: multi_range_read_next() function
DS-MRR/CPK: multi_range_read_next() function
...
@@ -941,10 +932,10 @@ void Key_value_records_iterator::close()
...
@@ -941,10 +932,10 @@ void Key_value_records_iterator::close()
@retval HA_ERR_END_OF_FILE End of records
@retval HA_ERR_END_OF_FILE End of records
@retval Other Some other error
@retval Other Some other error
*/
*/
int
DsMrr_impl
::
dsmrr_next_from_index
(
char
**
range_info_arg
)
int
DsMrr_impl
::
dsmrr_next_from_index
(
char
**
range_info_arg
)
{
{
DBUG_ENTER
(
"DsMrr_impl::dsmrr_next_from_index"
);
DBUG_ENTER
(
"DsMrr_impl::dsmrr_next_from_index"
);
//handler *file= do_rndpos_scan? h2: h;
while
(
1
)
while
(
1
)
{
{
...
@@ -963,7 +954,6 @@ int DsMrr_impl::dsmrr_next_from_index(char **range_info_arg)
...
@@ -963,7 +954,6 @@ int DsMrr_impl::dsmrr_next_from_index(char **range_info_arg)
{
{
while
(
kv_it
.
init
(
this
))
while
(
kv_it
.
init
(
this
))
{
{
/* Failed to initialize iterator */
if
(
key_buffer
->
is_empty
())
if
(
key_buffer
->
is_empty
())
{
{
if
(
dsmrr_eof
)
if
(
dsmrr_eof
)
...
@@ -986,7 +976,6 @@ int DsMrr_impl::dsmrr_next_from_index(char **range_info_arg)
...
@@ -986,7 +976,6 @@ int DsMrr_impl::dsmrr_next_from_index(char **range_info_arg)
}
}
}
}
}
}
/* if we got here, it means iterator was successfully initialized */
scanning_key_val_iter
=
TRUE
;
scanning_key_val_iter
=
TRUE
;
}
}
...
@@ -1006,6 +995,7 @@ int DsMrr_impl::dsmrr_next_from_index(char **range_info_arg)
...
@@ -1006,6 +995,7 @@ int DsMrr_impl::dsmrr_next_from_index(char **range_info_arg)
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
/**
/**
DS-MRR implementation: multi_range_read_next() function.
DS-MRR implementation: multi_range_read_next() function.
...
...
sql/multi_range_read.h
View file @
ac8a79b9
...
@@ -66,8 +66,6 @@ class Key_value_records_iterator
...
@@ -66,8 +66,6 @@ class Key_value_records_iterator
uchar
*
last_identical_key_ptr
;
uchar
*
last_identical_key_ptr
;
bool
get_next_row
;
bool
get_next_row
;
public:
public:
/*
*/
bool
init
(
DsMrr_impl
*
dsmrr
);
bool
init
(
DsMrr_impl
*
dsmrr
);
/*
/*
...
...
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