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
d3cd64fd
Commit
d3cd64fd
authored
Oct 09, 2016
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In MariaDB, KEY::actual_key_parts is named ext_key_parts
parent
84dd6470
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
storage/rocksdb/ha_rocksdb.cc
storage/rocksdb/ha_rocksdb.cc
+4
-4
storage/rocksdb/rdb_datadic.cc
storage/rocksdb/rdb_datadic.cc
+4
-4
No files found.
storage/rocksdb/ha_rocksdb.cc
View file @
d3cd64fd
...
...
@@ -5047,7 +5047,7 @@ int ha_rocksdb::create_cfs(const TABLE *table_arg, Rdb_tbl_def *tbl_def_arg,
!
is_hidden_pk
(
i
,
table_arg
,
tbl_def_arg
)
&&
tbl_def_arg
->
base_tablename
().
find
(
tmp_file_prefix
)
!=
0
)
{
for
(
uint
part
=
0
;
part
<
table_arg
->
key_info
[
i
].
actual
_key_parts
;
part
++
)
for
(
uint
part
=
0
;
part
<
table_arg
->
key_info
[
i
].
ext
_key_parts
;
part
++
)
{
if
(
!
rdb_is_index_collation_supported
(
table_arg
->
key_info
[
i
].
key_part
[
part
].
field
)
&&
...
...
@@ -7124,7 +7124,7 @@ bool ha_rocksdb::can_use_single_delete(uint index)
{
return
(
index
!=
pk_index
(
table
,
m_tbl_def
)
||
(
!
has_hidden_pk
(
table
)
&&
table
->
key_info
[
index
].
actual
_key_parts
==
table
->
s
->
fields
));
table
->
key_info
[
index
].
ext
_key_parts
==
table
->
s
->
fields
));
}
bool
ha_rocksdb
::
skip_unique_check
()
...
...
@@ -8351,7 +8351,7 @@ int ha_rocksdb::info(uint flag)
continue
;
}
KEY
*
k
=
&
table
->
key_info
[
i
];
for
(
uint
j
=
0
;
j
<
k
->
actual
_key_parts
;
j
++
)
for
(
uint
j
=
0
;
j
<
k
->
ext
_key_parts
;
j
++
)
{
const
Rdb_index_stats
&
k_stats
=
m_key_descr_arr
[
i
]
->
m_stats
;
uint
x
=
k_stats
.
m_distinct_keys_per_prefix
.
size
()
>
j
&&
...
...
@@ -8367,7 +8367,7 @@ int ha_rocksdb::info(uint flag)
// will have rec_per_key for (idx1)=4, (idx1,2)=2, and (idx1,2,3)=1.
// rec_per_key for the whole index is 1, and multiplied by 2^n if
// n suffix columns of the index are not used.
x
=
1
<<
(
k
->
actual
_key_parts
-
j
-
1
);
x
=
1
<<
(
k
->
ext
_key_parts
-
j
-
1
);
}
k
->
rec_per_key
[
j
]
=
x
;
}
...
...
storage/rocksdb/rdb_datadic.cc
View file @
d3cd64fd
...
...
@@ -160,7 +160,7 @@ void Rdb_key_def::setup(const TABLE *tbl, const Rdb_tbl_def *tbl_def)
}
if
(
secondary_key
)
m_pk_key_parts
=
hidden_pk_exists
?
1
:
pk_info
->
actual
_key_parts
;
m_pk_key_parts
=
hidden_pk_exists
?
1
:
pk_info
->
ext
_key_parts
;
else
{
pk_info
=
nullptr
;
...
...
@@ -168,7 +168,7 @@ void Rdb_key_def::setup(const TABLE *tbl, const Rdb_tbl_def *tbl_def)
}
// "unique" secondary keys support:
m_key_parts
=
is_hidden_pk
?
1
:
key_info
->
actual
_key_parts
;
m_key_parts
=
is_hidden_pk
?
1
:
key_info
->
ext
_key_parts
;
if
(
secondary_key
)
{
...
...
@@ -229,7 +229,7 @@ void Rdb_key_def::setup(const TABLE *tbl, const Rdb_tbl_def *tbl_def)
{
/* Check if this field is already present in the key definition */
bool
found
=
false
;
for
(
uint
j
=
0
;
j
<
key_info
->
actual
_key_parts
;
j
++
)
for
(
uint
j
=
0
;
j
<
key_info
->
ext
_key_parts
;
j
++
)
{
if
(
field
->
field_index
==
key_info
->
key_part
[
j
].
field
->
field_index
)
{
...
...
@@ -285,7 +285,7 @@ void Rdb_key_def::setup(const TABLE *tbl, const Rdb_tbl_def *tbl_def)
For "unique" secondary indexes, pretend they have
"index extensions"
*/
if
(
secondary_key
&&
src_i
+
1
==
key_info
->
actual
_key_parts
)
if
(
secondary_key
&&
src_i
+
1
==
key_info
->
ext
_key_parts
)
{
simulating_extkey
=
true
;
if
(
!
hidden_pk_exists
)
...
...
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