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

addresses #814

readd lock around f'n

git-svn-id: file:///svn/mysql/tokudb-engine/src@4942 c7de825b-a66e-492c-adef-691d508d4ae1
parent 6cae66f9
...@@ -1735,6 +1735,7 @@ int ha_tokudb::read_last() { ...@@ -1735,6 +1735,7 @@ int ha_tokudb::read_last() {
// //
void ha_tokudb::init_hidden_prim_key_info() { void ha_tokudb::init_hidden_prim_key_info() {
TOKUDB_DBUG_ENTER("ha_tokudb::init_prim_key_info"); TOKUDB_DBUG_ENTER("ha_tokudb::init_prim_key_info");
pthread_mutex_lock(&share->mutex);
if (!(share->status & STATUS_PRIMARY_KEY_INIT)) { if (!(share->status & STATUS_PRIMARY_KEY_INIT)) {
(void) extra(HA_EXTRA_KEYREAD); (void) extra(HA_EXTRA_KEYREAD);
int error = read_last(); int error = read_last();
...@@ -1754,7 +1755,8 @@ void ha_tokudb::init_hidden_prim_key_info() { ...@@ -1754,7 +1755,8 @@ void ha_tokudb::init_hidden_prim_key_info() {
} }
share->status |= STATUS_PRIMARY_KEY_INIT; share->status |= STATUS_PRIMARY_KEY_INIT;
} }
pthread_mutex_unlock(&share->mutex);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
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