Commit 0af29e91 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #814

restructure code before adding version and capabilities

git-svn-id: file:///svn/mysql/tokudb-engine/src@4928 c7de825b-a66e-492c-adef-691d508d4ae1
parent 914273aa
......@@ -1728,9 +1728,9 @@ int ha_tokudb::read_last() {
*/
void ha_tokudb::get_status() {
TOKUDB_DBUG_ENTER("ha_tokudb::get_status");
pthread_mutex_lock(&share->mutex);
if (!(share->status & STATUS_PRIMARY_KEY_INIT)) {
pthread_mutex_lock(&share->mutex);
(void) extra(HA_EXTRA_KEYREAD);
int error = read_last();
(void) extra(HA_EXTRA_NO_KEYREAD);
......@@ -1748,6 +1748,16 @@ void ha_tokudb::get_status() {
}
}
share->status |= STATUS_PRIMARY_KEY_INIT;
}
//
// retrieve metadata from status_block
//
//
// open status.tokudb
//
if (!share->status_block) {
char name_buff[FN_REFLEN];
char newname[get_name_length(share->table_name) + 32];
......@@ -1771,9 +1781,8 @@ void ha_tokudb::get_status() {
// previously added info from status.tokudb
// as of now, that info is not needed so removed dead code
//
share->status |= STATUS_PRIMARY_KEY_INIT;
pthread_mutex_unlock(&share->mutex);
}
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