Commit 320be7d6 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #863

get proper error msg returned

git-svn-id: file:///svn/mysql/tokudb-engine/src@4224 c7de825b-a66e-492c-adef-691d508d4ae1
parent 3962b4c5
......@@ -3324,6 +3324,14 @@ int ha_tokudb::add_index(TABLE *table_arg, KEY *key_info, uint num_of_keys) {
// it in a good state.
//
txn->commit(txn, 0);
//
// found a duplicate in a no_dup DB
//
if ( (error == DB_KEYEXIST) && (key_info[i].flags & HA_NOSAME)) {
error = HA_ERR_FOUND_DUPP_KEY;
last_dup_key = i;
memcpy(table_arg->record[0], tmp_record, table_arg->s->rec_buff_length);
}
goto cleanup;
}
}
......
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