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

addresses #852

remove extraneous flags that were lying around

git-svn-id: file:///svn/mysql/tokudb-engine/src@4923 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4fd73706
...@@ -73,8 +73,6 @@ typedef struct st_tokudb_trx_data { ...@@ -73,8 +73,6 @@ typedef struct st_tokudb_trx_data {
/* Bits for share->status */ /* Bits for share->status */
#define STATUS_PRIMARY_KEY_INIT 1 #define STATUS_PRIMARY_KEY_INIT 1
#define STATUS_ROW_COUNT_INIT 2
#define STATUS_TOKUDB_ANALYZE 4
#define STATUS_AUTO_INCREMENT_INIT 8 #define STATUS_AUTO_INCREMENT_INIT 8
// tokudb debug tracing // tokudb debug tracing
...@@ -1735,9 +1733,8 @@ int ha_tokudb::read_last() { ...@@ -1735,9 +1733,8 @@ int ha_tokudb::read_last() {
void ha_tokudb::get_status() { void ha_tokudb::get_status() {
TOKUDB_DBUG_ENTER("ha_tokudb::get_status"); TOKUDB_DBUG_ENTER("ha_tokudb::get_status");
if (!test_all_bits(share->status, (STATUS_PRIMARY_KEY_INIT | STATUS_ROW_COUNT_INIT))) {
pthread_mutex_lock(&share->mutex);
if (!(share->status & STATUS_PRIMARY_KEY_INIT)) { if (!(share->status & STATUS_PRIMARY_KEY_INIT)) {
pthread_mutex_lock(&share->mutex);
(void) extra(HA_EXTRA_KEYREAD); (void) extra(HA_EXTRA_KEYREAD);
int error = read_last(); int error = read_last();
(void) extra(HA_EXTRA_NO_KEYREAD); (void) extra(HA_EXTRA_NO_KEYREAD);
...@@ -1754,7 +1751,6 @@ void ha_tokudb::get_status() { ...@@ -1754,7 +1751,6 @@ void ha_tokudb::get_status() {
TOKUDB_TRACE("init auto increment:%lld\n", share->last_auto_increment); TOKUDB_TRACE("init auto increment:%lld\n", share->last_auto_increment);
} }
} }
}
if (!share->status_block) { if (!share->status_block) {
char name_buff[FN_REFLEN]; char name_buff[FN_REFLEN];
...@@ -1773,14 +1769,12 @@ void ha_tokudb::get_status() { ...@@ -1773,14 +1769,12 @@ void ha_tokudb::get_status() {
} }
} }
if (!(share->status & STATUS_ROW_COUNT_INIT) && share->status_block) {
// //
// do nothing for now // do nothing for now
// previously added info from status.tokudb // previously added info from status.tokudb
// as of now, that info is not needed so removed dead code // as of now, that info is not needed so removed dead code
// //
} share->status |= STATUS_PRIMARY_KEY_INIT;
share->status |= STATUS_PRIMARY_KEY_INIT | STATUS_ROW_COUNT_INIT;
pthread_mutex_unlock(&share->mutex); pthread_mutex_unlock(&share->mutex);
} }
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
...@@ -1788,7 +1782,6 @@ void ha_tokudb::get_status() { ...@@ -1788,7 +1782,6 @@ void ha_tokudb::get_status() {
static void update_status(TOKUDB_SHARE * share, TABLE * table) { static void update_status(TOKUDB_SHARE * share, TABLE * table) {
TOKUDB_DBUG_ENTER("update_status"); TOKUDB_DBUG_ENTER("update_status");
if (share->status & STATUS_TOKUDB_ANALYZE) {
pthread_mutex_lock(&share->mutex); pthread_mutex_lock(&share->mutex);
if (!share->status_block) { if (!share->status_block) {
/* /*
...@@ -1811,11 +1804,9 @@ static void update_status(TOKUDB_SHARE * share, TABLE * table) { ...@@ -1811,11 +1804,9 @@ static void update_status(TOKUDB_SHARE * share, TABLE * table) {
// used to write data here. The data that was written // used to write data here. The data that was written
// is no longer required to be put in status.tokudb // is no longer required to be put in status.tokudb
// //
share->status &= ~STATUS_TOKUDB_ANALYZE;
} }
end: end:
pthread_mutex_unlock(&share->mutex); pthread_mutex_unlock(&share->mutex);
}
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -4064,6 +4055,10 @@ void ha_tokudb::print_error(int error, myf errflag) { ...@@ -4064,6 +4055,10 @@ void ha_tokudb::print_error(int error, myf errflag) {
} }
#if 0 // QQQ use default #if 0 // QQQ use default
//
// This function will probably need to be redone from scratch
// if we ever choose to implement it
//
int ha_tokudb::analyze(THD * thd, HA_CHECK_OPT * check_opt) { int ha_tokudb::analyze(THD * thd, HA_CHECK_OPT * check_opt) {
uint i; uint i;
DB_BTREE_STAT *stat = 0; DB_BTREE_STAT *stat = 0;
......
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