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
83cdccdb
Commit
83cdccdb
authored
May 10, 2018
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bb-10.2-mariarocks' into 10.2
parents
69b46aac
ffb48234
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
storage/rocksdb/ha_rocksdb.cc
storage/rocksdb/ha_rocksdb.cc
+22
-2
storage/rocksdb/ha_rocksdb.h
storage/rocksdb/ha_rocksdb.h
+4
-0
storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc
...rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc
+1
-0
storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums-master.opt
...rocksdb/mysql-test/rocksdb/t/rocksdb_checksums-master.opt
+1
-0
No files found.
storage/rocksdb/ha_rocksdb.cc
View file @
83cdccdb
...
...
@@ -7141,12 +7141,17 @@ int rdb_normalize_tablename(const std::string &tablename,
std
::
string
*
const
strbuf
)
{
DBUG_ASSERT
(
strbuf
!=
nullptr
);
if
(
tablename
.
size
()
<
2
||
tablename
[
0
]
!=
'.'
||
tablename
[
1
]
!=
FN_LIBCHAR
)
{
if
(
tablename
.
size
()
<
2
||
tablename
[
0
]
!=
'.'
||
(
tablename
[
1
]
!=
FN_LIBCHAR
&&
tablename
[
1
]
!=
FN_LIBCHAR2
))
{
DBUG_ASSERT
(
0
);
// We were not passed table name?
return
HA_ERR_ROCKSDB_INVALID_TABLE
;
}
size_t
pos
=
tablename
.
find_first_of
(
FN_LIBCHAR
,
2
);
if
(
pos
==
std
::
string
::
npos
)
{
pos
=
tablename
.
find_first_of
(
FN_LIBCHAR2
,
2
);
}
if
(
pos
==
std
::
string
::
npos
)
{
DBUG_ASSERT
(
0
);
// We were not passed table name?
return
HA_ERR_ROCKSDB_INVALID_TABLE
;
...
...
@@ -7925,6 +7930,15 @@ int ha_rocksdb::prepare_range_scan(const key_range *start_key,
const
key_range
*
end_key
)
{
range_key_part
=
table
->
key_info
[
active_index
].
key_part
;
if
(
start_key
)
{
m_save_start_range
=
*
start_key
;
m_start_range
=
&
m_save_start_range
;
}
else
m_start_range
=
NULL
;
set_end_range
(
end_key
);
return
0
;
}
...
...
@@ -8054,8 +8068,12 @@ int ha_rocksdb::index_read_map_impl(uchar *const buf, const uchar *const key,
packed_size
);
uint
end_key_packed_size
=
0
;
const
key_range
*
cur_end_key
=
end_key
;
if
(
find_flag
==
HA_READ_PREFIX_LAST_OR_PREV
)
cur_end_key
=
m_start_range
;
const
uint
eq_cond_len
=
calc_eq_cond_len
(
kd
,
find_flag
,
slice
,
bytes_changed_by_succ
,
end_key
,
calc_eq_cond_len
(
kd
,
find_flag
,
slice
,
bytes_changed_by_succ
,
cur_
end_key
,
&
end_key_packed_size
);
bool
use_all_keys
=
false
;
...
...
@@ -9996,6 +10014,7 @@ int ha_rocksdb::index_init(uint idx, bool sorted) {
DBUG_ASSERT
(
tx
!=
nullptr
);
setup_read_decoders
();
m_start_range
=
NULL
;
if
(
!
m_keyread_only
)
{
m_key_descr_arr
[
idx
]
->
get_lookup_bitmap
(
table
,
&
m_lookup_bitmap
);
...
...
@@ -10024,6 +10043,7 @@ int ha_rocksdb::index_end() {
active_index
=
MAX_KEY
;
in_range_check_pushed_down
=
FALSE
;
m_start_range
=
NULL
;
DBUG_RETURN
(
HA_EXIT_SUCCESS
);
}
...
...
storage/rocksdb/ha_rocksdb.h
View file @
83cdccdb
...
...
@@ -493,6 +493,10 @@ class ha_rocksdb : public my_core::handler {
/* Iterator used for range scans and for full table/index scans */
rocksdb
::
Iterator
*
m_scan_it
;
/* Same as handler::end_key but for start. Reverse-ordered scans need it */
key_range
m_save_start_range
;
const
key_range
*
m_start_range
;
/* Whether m_scan_it was created with skip_bloom=true */
bool
m_scan_it_skips_bloom
;
...
...
storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc
View file @
83cdccdb
...
...
@@ -83,6 +83,7 @@ eval CREATE TABLE t3(a INT, b INT, PRIMARY KEY(a) COMMENT "$pk_cf")
perl
;
my
$fn
=
$ENV
{
'ROCKSDB_INFILE'
};
open
(
my
$fh
,
'>'
,
$fn
)
||
die
"perl open(
$fn
): $!"
;
binmode
$fh
;
my
$max
=
5000000
;
my
$sign
=
1
;
for
(
my
$ii
=
0
;
$ii
<
$max
;
$ii
++
)
...
...
storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums-master.opt
View file @
83cdccdb
--rocksdb_debug_optimizer_n_rows=1000
--rocksdb_records_in_range=50
--log_warnings=3
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