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

addresses #1088

fix null keys in case for updates

git-svn-id: file:///svn/mysql/tokudb-engine/src@5632 c7de825b-a66e-492c-adef-691d508d4ae1
parent 39634ae9
...@@ -2212,6 +2212,7 @@ int ha_tokudb::update_row(const uchar * old_row, uchar * new_row) { ...@@ -2212,6 +2212,7 @@ int ha_tokudb::update_row(const uchar * old_row, uchar * new_row) {
if ((error = remove_key(txn, keynr, old_row, &old_prim_key))) { if ((error = remove_key(txn, keynr, old_row, &old_prim_key))) {
goto cleanup; goto cleanup;
} }
create_dbt_key_from_table(&key, keynr, key_buff2, new_row, &has_null),
put_flags = share->key_type[keynr]; put_flags = share->key_type[keynr];
if (put_flags == DB_NOOVERWRITE && (has_null || thd_test_options(thd, OPTION_RELAXED_UNIQUE_CHECKS))) { if (put_flags == DB_NOOVERWRITE && (has_null || thd_test_options(thd, OPTION_RELAXED_UNIQUE_CHECKS))) {
put_flags = DB_YESOVERWRITE; put_flags = DB_YESOVERWRITE;
...@@ -2219,7 +2220,7 @@ int ha_tokudb::update_row(const uchar * old_row, uchar * new_row) { ...@@ -2219,7 +2220,7 @@ int ha_tokudb::update_row(const uchar * old_row, uchar * new_row) {
error = share->key_file[keynr]->put( error = share->key_file[keynr]->put(
share->key_file[keynr], share->key_file[keynr],
txn, txn,
create_dbt_key_from_table(&key, keynr, key_buff2, new_row, &has_null), &key,
&prim_key, &prim_key,
put_flags put_flags
); );
......
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