Commit deba4ef1 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

honor UNIQUE_CHECKS=0 in secondary index writes. close #462

git-svn-id: file:///svn/mysql/tokudb-engine/src@2513 c7de825b-a66e-492c-adef-691d508d4ae1
parent 49a40838
......@@ -1237,7 +1237,10 @@ int ha_tokudb::write_row(uchar * record) {
for (uint keynr = 0; keynr < table_share->keys; keynr++) {
if (keynr == primary_key)
continue;
if ((error = key_file[keynr]->put(key_file[keynr], sub_trans, create_key(&key, keynr, key_buff2, record), &prim_key, key_type[keynr]))) {
put_flags = key_type[keynr];
if (put_flags == DB_NOOVERWRITE && thd_test_options(thd, OPTION_RELAXED_UNIQUE_CHECKS))
put_flags = DB_YESOVERWRITE;
if ((error = key_file[keynr]->put(key_file[keynr], sub_trans, create_key(&key, keynr, key_buff2, record), &prim_key, put_flags))) {
last_dup_key = keynr;
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