Commit d755a5cf authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

refs #5585, make a fix to help joins using unique keys

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@48891 c7de825b-a66e-492c-adef-691d508d4ae1
parent d6279fce
...@@ -5721,7 +5721,9 @@ int ha_tokudb::info(uint flag) { ...@@ -5721,7 +5721,9 @@ int ha_tokudb::info(uint flag) {
if ((flag & HA_STATUS_CONST)) { if ((flag & HA_STATUS_CONST)) {
stats.max_data_file_length= 9223372036854775807ULL; stats.max_data_file_length= 9223372036854775807ULL;
for (uint i = 0; i < table_share->keys; i++) { for (uint i = 0; i < table_share->keys; i++) {
table->key_info[i].rec_per_key[table->key_info[i].key_parts - 1] = 0; bool is_unique_key = (i == primary_key) || (table->key_info[i].flags & HA_NOSAME);
ulong val = (is_unique_key) ? 1 : 0;
table->key_info[i].rec_per_key[table->key_info[i].key_parts - 1] = val;
} }
} }
/* Don't return key if we got an error for the internal primary key */ /* Don't return key if we got an error for the internal primary key */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment