Commit c90e932d authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

refs #6022 always compile analyze into the code

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@53996 c7de825b-a66e-492c-adef-691d508d4ae1
parent 2cfb7b0a
......@@ -494,10 +494,8 @@ public:
int delete_table(const char *name);
int rename_table(const char *from, const char *to);
int optimize(THD * thd, HA_CHECK_OPT * check_opt);
#if TOKU_INCLUDE_ANALYZE
int analyze(THD * thd, HA_CHECK_OPT * check_opt);
int analyze_key(THD *thd, DB_TXN *txn, uint key_i, KEY *key_info, uint64_t num_key_parts, uint64_t *rec_per_key_part);
#endif
int write_row(uchar * buf);
int update_row(const uchar * old_data, uchar * new_data);
int delete_row(const uchar * buf);
......
#if TOKU_INCLUDE_ANALYZE
volatile int ha_tokudb_analyze_wait = 0; // debug
int ha_tokudb::analyze(THD *thd, HA_CHECK_OPT *check_opt) {
......@@ -124,8 +122,6 @@ int ha_tokudb::analyze_key(THD *thd, DB_TXN *txn, uint key_i, KEY *key_info, uin
TOKUDB_DBUG_RETURN(error);
}
#endif
static int hot_poll_fun(void *extra, float progress) {
HOT_OPTIMIZE_CONTEXT context = (HOT_OPTIMIZE_CONTEXT)extra;
if (context->thd->killed) {
......
......@@ -1577,7 +1577,6 @@ int tokudb_prefix_cmp_dbt_key(DB *file, const DBT *keya, const DBT *keyb) {
return cmp;
}
#if TOKU_INCLUDE_ANALYZE
static int tokudb_compare_two_key_parts(
const void* new_key_data,
const uint32_t new_key_size,
......@@ -1679,7 +1678,6 @@ static int tokudb_cmp_dbt_key_parts(DB *file, const DBT *keya, const DBT *keyb,
(*(uint32_t *)file->cmp_descriptor->dbt.data) - 4,
max_parts);
}
#endif
uint32_t create_toku_main_key_pack_descriptor (
uchar* buf
......
......@@ -279,7 +279,6 @@ int tokudb_cmp_dbt_key(DB* db, const DBT *keya, const DBT *keyb);
//TODO: QQQ Only do one direction for prefix.
int tokudb_prefix_cmp_dbt_key(DB *file, const DBT *keya, const DBT *keyb);
#if TOKU_INCLUDE_ANALYZE
static int tokudb_compare_two_key_parts(
const void* new_key_data,
const uint32_t new_key_size,
......@@ -291,7 +290,6 @@ static int tokudb_compare_two_key_parts(
);
static int tokudb_cmp_dbt_key_parts(DB *file, const DBT *keya, const DBT *keyb, uint max_parts);
#endif
int create_toku_key_descriptor(
uchar* buf,
......
......@@ -49,7 +49,6 @@
#if DB_TYPE_TOKUDB_DEFINED
#define TOKU_INCLUDE_EXTENDED_KEYS 1
#endif
#define TOKU_INCLUDE_ANALYZE 1
#elif 50500 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50599
#define TOKU_INCLUDE_ALTER_56 1
......@@ -62,7 +61,6 @@
#if defined(MARIADB_BASE_VERSION) && DB_TYPE_TOKUDB_DEFINED
#define TOKU_INCLUDE_EXTENDED_KEYS 1
#endif
#define TOKU_INCLUDE_ANALYZE 1
#else
......
......@@ -155,7 +155,6 @@ static MYSQL_THDVAR_BOOL(disable_slow_upsert,
false // default
);
#endif
#if TOKU_INCLUDE_ANALYZE
static MYSQL_THDVAR_UINT(analyze_time,
0,
"analyze time",
......@@ -166,7 +165,6 @@ static MYSQL_THDVAR_UINT(analyze_time,
~0U, // max
1 // blocksize???
);
#endif
static void tokudb_checkpoint_lock(THD * thd);
static void tokudb_checkpoint_unlock(THD * thd);
......@@ -724,11 +722,9 @@ bool get_disable_slow_upsert(THD *thd) {
return (THDVAR(thd, disable_slow_upsert) != 0);
}
#endif
#if TOKU_INCLUDE_ANALYZE
uint get_analyze_time(THD *thd) {
return THDVAR(thd, analyze_time);
}
#endif
typedef struct txn_progress_info {
char status[200];
......@@ -1930,9 +1926,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = {
MYSQL_SYSVAR(disable_slow_update),
MYSQL_SYSVAR(disable_slow_upsert),
#endif
#if TOKU_INCLUDE_ANALYZE
MYSQL_SYSVAR(analyze_time),
#endif
NULL
};
......
......@@ -38,9 +38,7 @@ bool get_disable_slow_update(THD *thd);
bool get_enable_fast_upsert(THD *thd);
bool get_disable_slow_upsert(THD *thd);
#endif
#if TOKU_INCLUDE_ANALYZE
uint get_analyze_time(THD *thd);
#endif
extern HASH tokudb_open_tables;
extern pthread_mutex_t tokudb_mutex;
......
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