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
4b034b24
Commit
4b034b24
authored
Oct 24, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DB-746 merge clustering key is covering key for mariadb 10
parent
fdf7cb1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+16
-13
storage/tokudb/hatoku_defines.h
storage/tokudb/hatoku_defines.h
+1
-0
No files found.
storage/tokudb/ha_tokudb.cc
View file @
4b034b24
...
...
@@ -4485,6 +4485,11 @@ int ha_tokudb::index_init(uint keynr, bool sorted) {
}
tokudb_active_index
=
keynr
;
#if TOKU_CLUSTERING_IS_COVERING
if
(
keynr
<
table
->
s
->
keys
&&
table
->
key_info
[
keynr
].
option_struct
->
clustering
)
key_read
=
false
;
#endif
last_cursor_error
=
0
;
range_lock_grabbed
=
false
;
range_lock_grabbed_null
=
false
;
...
...
@@ -5834,11 +5839,14 @@ void ha_tokudb::position(const uchar * record) {
// 0, always success
//
int
ha_tokudb
::
info
(
uint
flag
)
{
TOKUDB_HANDLER_DBUG_ENTER
(
"%d %lld"
,
flag
,
(
long
long
)
share
->
rows
);
int
error
;
TOKUDB_HANDLER_DBUG_ENTER
(
"%d"
,
flag
);
int
error
=
0
;
#if TOKU_CLUSTERING_IS_COVERING
for
(
uint
i
=
0
;
i
<
table
->
s
->
keys
;
i
++
)
if
(
table
->
key_info
[
i
].
option_struct
->
clustering
)
table
->
covering_keys
.
set_bit
(
i
);
#endif
DB_TXN
*
txn
=
NULL
;
uint
curr_num_DBs
=
table
->
s
->
keys
+
tokudb_test
(
hidden_primary_key
);
DB_BTREE_STAT64
dict_stats
;
if
(
flag
&
HA_STATUS_VARIABLE
)
{
// Just to get optimizations right
stats
.
records
=
share
->
rows
+
share
->
rows_from_locked_table
;
...
...
@@ -5868,18 +5876,12 @@ int ha_tokudb::info(uint flag) {
else
{
goto
cleanup
;
}
error
=
share
->
file
->
get_fragmentation
(
share
->
file
,
&
frag_info
);
error
=
share
->
file
->
get_fragmentation
(
share
->
file
,
&
frag_info
);
if
(
error
)
{
goto
cleanup
;
}
stats
.
delete_length
=
frag_info
.
unused_bytes
;
error
=
share
->
file
->
stat64
(
share
->
file
,
txn
,
&
dict_stats
);
DB_BTREE_STAT64
dict_stats
;
error
=
share
->
file
->
stat64
(
share
->
file
,
txn
,
&
dict_stats
);
if
(
error
)
{
goto
cleanup
;
}
stats
.
create_time
=
dict_stats
.
bt_create_time_sec
;
...
...
@@ -5915,6 +5917,7 @@ int ha_tokudb::info(uint flag) {
//
// this solution is much simpler than trying to maintain an
// accurate number of valid keys at the handlerton layer.
uint
curr_num_DBs
=
table
->
s
->
keys
+
tokudb_test
(
hidden_primary_key
);
for
(
uint
i
=
0
;
i
<
curr_num_DBs
;
i
++
)
{
// skip the primary key, skip dropped indexes
if
(
i
==
primary_key
||
share
->
key_file
[
i
]
==
NULL
)
{
...
...
storage/tokudb/hatoku_defines.h
View file @
4b034b24
...
...
@@ -113,6 +113,7 @@ PATENT RIGHTS GRANT:
#endif
#define TOKU_INCLUDE_OPTION_STRUCTS 1
#define TOKU_OPTIMIZE_WITH_RECREATE 1
#define TOKU_CLUSTERING_IS_COVERING 1
#elif 50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799
// mysql 5.7 with no patches
...
...
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