Commit 6b512e3b authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:2599], upon finding a uniqueness violation, properly unpack the key

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@20167 c7de825b-a66e-492c-adef-691d508d4ae1
parent 3c631172
......@@ -3055,6 +3055,12 @@ int ha_tokudb::is_index_unique(bool* is_unique, DB_TXN* txn, DB* db, KEY* key_in
if (!has_null1 && !has_null2) {
cmp = tokudb_prefix_cmp_dbt_key(db, &packed_key1, &packed_key2);
if (cmp == 0) {
memcpy(key_buff, key1.data, key1.size);
place_key_into_mysql_buff(
key_info,
table->record[0],
(uchar *) key_buff + 1
);
*is_unique = false;
break;
}
......
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