mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
[t:2012], make amount of data shown in show table status same as show in show engine tokudb user_data
git-svn-id: file:///svn/mysql/tokudb-engine/src@14681 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
594898de0a
commit
cb56f1b136
1 changed files with 17 additions and 1 deletions
|
@ -4167,8 +4167,24 @@ int ha_tokudb::info(uint flag) {
|
|||
&dict_stats
|
||||
);
|
||||
if (error) { goto cleanup; }
|
||||
|
||||
|
||||
stats.data_file_length = dict_stats.bt_dsize;
|
||||
if (hidden_primary_key) {
|
||||
//
|
||||
// in this case, we have a hidden primary key, do not
|
||||
// want to report space taken up by the hidden primary key to the user
|
||||
//
|
||||
u_int64_t hpk_space = TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH*dict_stats.bt_ndata;
|
||||
stats.data_file_length = (hpk_space > stats.data_file_length) ? 0 : stats.data_file_length - hpk_space;
|
||||
}
|
||||
else {
|
||||
//
|
||||
// one infinity byte per key needs to be subtracted
|
||||
//
|
||||
u_int64_t inf_byte_space = dict_stats.bt_ndata;
|
||||
stats.data_file_length = (inf_byte_space > stats.data_file_length) ? 0 : stats.data_file_length - inf_byte_space;
|
||||
}
|
||||
|
||||
stats.mean_rec_length = stats.records ? (ulong)(stats.data_file_length/stats.records) : 0;
|
||||
stats.index_file_length = 0;
|
||||
for (uint i = 0; i < curr_num_DBs; i++) {
|
||||
|
|
Loading…
Reference in a new issue