Skip to content

Commit d3cd64f

Browse files
committed
In MariaDB, KEY::actual_key_parts is named ext_key_parts
1 parent 84dd647 commit d3cd64f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

storage/rocksdb/ha_rocksdb.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5047,7 +5047,7 @@ int ha_rocksdb::create_cfs(const TABLE *table_arg, Rdb_tbl_def *tbl_def_arg,
50475047
!is_hidden_pk(i, table_arg, tbl_def_arg) &&
50485048
tbl_def_arg->base_tablename().find(tmp_file_prefix) != 0)
50495049
{
5050-
for (uint part= 0; part < table_arg->key_info[i].actual_key_parts; part++)
5050+
for (uint part= 0; part < table_arg->key_info[i].ext_key_parts; part++)
50515051
{
50525052
if (!rdb_is_index_collation_supported(
50535053
table_arg->key_info[i].key_part[part].field) &&
@@ -7124,7 +7124,7 @@ bool ha_rocksdb::can_use_single_delete(uint index)
71247124
{
71257125
return (index != pk_index(table, m_tbl_def) ||
71267126
(!has_hidden_pk(table) &&
7127-
table->key_info[index].actual_key_parts == table->s->fields));
7127+
table->key_info[index].ext_key_parts == table->s->fields));
71287128
}
71297129

71307130
bool ha_rocksdb::skip_unique_check()
@@ -8351,7 +8351,7 @@ int ha_rocksdb::info(uint flag)
83518351
continue;
83528352
}
83538353
KEY* k= &table->key_info[i];
8354-
for (uint j = 0; j < k->actual_key_parts; j++)
8354+
for (uint j = 0; j < k->ext_key_parts; j++)
83558355
{
83568356
const Rdb_index_stats& k_stats= m_key_descr_arr[i]->m_stats;
83578357
uint x = k_stats.m_distinct_keys_per_prefix.size() > j &&
@@ -8367,7 +8367,7 @@ int ha_rocksdb::info(uint flag)
83678367
// will have rec_per_key for (idx1)=4, (idx1,2)=2, and (idx1,2,3)=1.
83688368
// rec_per_key for the whole index is 1, and multiplied by 2^n if
83698369
// n suffix columns of the index are not used.
8370-
x = 1 << (k->actual_key_parts-j-1);
8370+
x = 1 << (k->ext_key_parts-j-1);
83718371
}
83728372
k->rec_per_key[j]= x;
83738373
}

storage/rocksdb/rdb_datadic.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,15 @@ void Rdb_key_def::setup(const TABLE *tbl, const Rdb_tbl_def *tbl_def)
160160
}
161161

162162
if (secondary_key)
163-
m_pk_key_parts= hidden_pk_exists ? 1 : pk_info->actual_key_parts;
163+
m_pk_key_parts= hidden_pk_exists ? 1 : pk_info->ext_key_parts;
164164
else
165165
{
166166
pk_info= nullptr;
167167
m_pk_key_parts= 0;
168168
}
169169

170170
// "unique" secondary keys support:
171-
m_key_parts= is_hidden_pk ? 1 : key_info->actual_key_parts;
171+
m_key_parts= is_hidden_pk ? 1 : key_info->ext_key_parts;
172172

173173
if (secondary_key)
174174
{
@@ -229,7 +229,7 @@ void Rdb_key_def::setup(const TABLE *tbl, const Rdb_tbl_def *tbl_def)
229229
{
230230
/* Check if this field is already present in the key definition */
231231
bool found= false;
232-
for (uint j= 0; j < key_info->actual_key_parts; j++)
232+
for (uint j= 0; j < key_info->ext_key_parts; j++)
233233
{
234234
if (field->field_index == key_info->key_part[j].field->field_index)
235235
{
@@ -285,7 +285,7 @@ void Rdb_key_def::setup(const TABLE *tbl, const Rdb_tbl_def *tbl_def)
285285
For "unique" secondary indexes, pretend they have
286286
"index extensions"
287287
*/
288-
if (secondary_key && src_i+1 == key_info->actual_key_parts)
288+
if (secondary_key && src_i+1 == key_info->ext_key_parts)
289289
{
290290
simulating_extkey= true;
291291
if (!hidden_pk_exists)

0 commit comments

Comments
 (0)