Commit 2cf36462 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #1699

set share->key_file[pk] = share->file before open so that it gets cleaned up
on failure

git-svn-id: file:///svn/mysql/tokudb-engine/src@11430 c7de825b-a66e-492c-adef-691d508d4ae1
parent 48a4528c
...@@ -1030,6 +1030,8 @@ int ha_tokudb::initialize_share( ...@@ -1030,6 +1030,8 @@ int ha_tokudb::initialize_share(
if (error) { if (error) {
goto exit; goto exit;
} }
share->key_file[primary_key] = share->file;
share->key_type[primary_key] = hidden_primary_key ? DB_YESOVERWRITE : DB_NOOVERWRITE;
// //
// set comparison function for main.tokudb // set comparison function for main.tokudb
...@@ -1048,8 +1050,6 @@ int ha_tokudb::initialize_share( ...@@ -1048,8 +1050,6 @@ int ha_tokudb::initialize_share(
} }
/* Open other keys; These are part of the share structure */ /* Open other keys; These are part of the share structure */
share->key_file[primary_key] = share->file;
share->key_type[primary_key] = hidden_primary_key ? DB_YESOVERWRITE : DB_NOOVERWRITE;
for (uint i = 0; i < table_share->keys; i++) { for (uint i = 0; i < table_share->keys; i++) {
if (i != primary_key) { if (i != primary_key) {
......
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