diff options
author | Rich Prohaska <prohaska@tokutek.com> | 2014-01-15 11:51:10 -0500 |
---|---|---|
committer | Rich Prohaska <prohaska@tokutek.com> | 2014-01-15 11:51:10 -0500 |
commit | 0d6c69d760ee253d49f54a665635e686a8559116 (patch) | |
tree | 60ec3df65b43eead48be4bdb74c0d3dc1db58759 | |
parent | 907eaff9e44892faf1ada6113467c95e7d01464e (diff) | |
download | mariadb-git-0d6c69d760ee253d49f54a665635e686a8559116.tar.gz |
#167 use a serializable cursor to check for PK duplicate
-rw-r--r-- | storage/tokudb/ha_tokudb.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index 37b6675151a..8cbb4c9f184 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -3995,14 +3995,14 @@ int ha_tokudb::write_row(uchar * record) { // if we have a duplicate key error, let's check the primary key to see // if there is a duplicate there. If so, set last_dup_key to the pk if (error == DB_KEYEXIST && !tokudb_test(hidden_primary_key) && last_dup_key != primary_key) { - int r = share->file->getf_set(share->file, txn, 0, &prim_key, smart_dbt_do_nothing, NULL); + int r = share->file->getf_set(share->file, txn, DB_SERIALIZABLE, &prim_key, smart_dbt_do_nothing, NULL); if (r == 0) { // if we get no error, that means the row // was found and this is a duplicate key, // so we set last_dup_key last_dup_key = primary_key; } - else if (r != DB_NOTFOUND && r != TOKUDB_MVCC_DICTIONARY_TOO_NEW) { + else if (r != DB_NOTFOUND) { // if some other error is returned, return that to the user. error = r; } @@ -7172,7 +7172,7 @@ cleanup: // error otherwise // int ha_tokudb::delete_table(const char *name) { - TOKUDB_HANDLER_DBUG_ENTER(""); + TOKUDB_HANDLER_DBUG_ENTER("%s", name); int error; error = delete_or_rename_table(name, NULL, true); if (error == DB_LOCK_NOTGRANTED && ((tokudb_debug & TOKUDB_DEBUG_HIDE_DDL_LOCK_ERRORS) == 0)) { |