restructure code before adding version and capabilities

git-svn-id: file:///svn/mysql/tokudb-engine/src@4928 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Zardosht Kasheff 2013-04-17 00:01:43 -04:00 committed by Yoni Fogel
parent 1bb28b0dac
commit e9e3cd0508

View file

@ -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;
}