Commit 81fd9403 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

replace tables in handlerton files

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@46186 c7de825b-a66e-492c-adef-691d508d4ae1
parent 274b25eb
...@@ -5420,7 +5420,7 @@ void ha_tokudb::track_progress(THD* thd) { ...@@ -5420,7 +5420,7 @@ void ha_tokudb::track_progress(THD* thd) {
first = false; first = false;
} }
if (!first) if (!first)
thd_proc_info(thd, write_status_msg); thd_proc_info(thd, write_status_msg);
} }
} }
} }
......
...@@ -576,7 +576,7 @@ class ha_tokudb : public handler { ...@@ -576,7 +576,7 @@ class ha_tokudb : public handler {
TABLE *altered_table, TABLE *altered_table,
HA_CREATE_INFO *create_info, HA_CREATE_INFO *create_info,
HA_ALTER_INFO *alter_info, HA_ALTER_INFO *alter_info,
HA_ALTER_FLAGS *alter_flags); HA_ALTER_FLAGS *alter_flags);
int alter_table_phase3(THD *thd, TABLE *table) int alter_table_phase3(THD *thd, TABLE *table)
{ {
return 0; return 0;
......
...@@ -5,10 +5,10 @@ class ha_tokudb_add_index : public handler_add_index { ...@@ -5,10 +5,10 @@ class ha_tokudb_add_index : public handler_add_index {
DB_TXN *txn; DB_TXN *txn;
bool incremented_numDBs; bool incremented_numDBs;
bool modified_DBs; bool modified_DBs;
ha_tokudb_add_index(TABLE* table, KEY* key_info, uint num_of_keys, DB_TXN *txn, bool incremented_numDBs, bool modified_DBs) : ha_tokudb_add_index(TABLE* table, KEY* key_info, uint num_of_keys, DB_TXN *txn, bool incremented_numDBs, bool modified_DBs) :
handler_add_index(table, key_info, num_of_keys), txn(txn), incremented_numDBs(incremented_numDBs), modified_DBs(modified_DBs) { handler_add_index(table, key_info, num_of_keys), txn(txn), incremented_numDBs(incremented_numDBs), modified_DBs(modified_DBs) {
} }
~ha_tokudb_add_index() { ~ha_tokudb_add_index() {
} }
}; };
......
...@@ -41,103 +41,103 @@ static uchar *tokudb_get_key(TOKUDB_SHARE * share, size_t * length, my_bool not_ ...@@ -41,103 +41,103 @@ static uchar *tokudb_get_key(TOKUDB_SHARE * share, size_t * length, my_bool not_
} }
static handler *tokudb_create_handler(handlerton * hton, TABLE_SHARE * table, MEM_ROOT * mem_root); static handler *tokudb_create_handler(handlerton * hton, TABLE_SHARE * table, MEM_ROOT * mem_root);
static MYSQL_THDVAR_BOOL(commit_sync, static MYSQL_THDVAR_BOOL(commit_sync,
PLUGIN_VAR_THDLOCAL, PLUGIN_VAR_THDLOCAL,
"sync on txn commit", "sync on txn commit",
/* check */ NULL, /* check */ NULL,
/* update */ NULL, /* update */ NULL,
/* default*/ true /* default*/ true
); );
static MYSQL_THDVAR_UINT(pk_insert_mode, static MYSQL_THDVAR_UINT(pk_insert_mode,
0, 0,
"set the primary key insert mode", "set the primary key insert mode",
NULL, NULL,
NULL, NULL,
1, // default 1, // default
0, // min? 0, // min?
2, // max 2, // max
1 // blocksize 1 // blocksize
); );
static MYSQL_THDVAR_BOOL(load_save_space, static MYSQL_THDVAR_BOOL(load_save_space,
0, 0,
"if on, intial loads are slower but take less space", "if on, intial loads are slower but take less space",
NULL, NULL,
NULL, NULL,
false false
); );
static MYSQL_THDVAR_BOOL(disable_slow_alter, static MYSQL_THDVAR_BOOL(disable_slow_alter,
0, 0,
"if on, alter tables that require copy are disabled", "if on, alter tables that require copy are disabled",
NULL, NULL,
NULL, NULL,
false false
); );
static MYSQL_THDVAR_BOOL(disable_hot_alter, static MYSQL_THDVAR_BOOL(disable_hot_alter,
0, 0,
"if on, hot alter table is disabled", "if on, hot alter table is disabled",
NULL, NULL,
NULL, NULL,
false false
); );
static MYSQL_THDVAR_BOOL(create_index_online, static MYSQL_THDVAR_BOOL(create_index_online,
0, 0,
"if on, create index done online", "if on, create index done online",
NULL, NULL,
NULL, NULL,
true true
); );
static MYSQL_THDVAR_BOOL(disable_prefetching, static MYSQL_THDVAR_BOOL(disable_prefetching,
0, 0,
"if on, prefetching disabled", "if on, prefetching disabled",
NULL, NULL,
NULL, NULL,
false false
); );
static MYSQL_THDVAR_BOOL(prelock_empty, static MYSQL_THDVAR_BOOL(prelock_empty,
0, 0,
"Tokudb Prelock Empty Table", "Tokudb Prelock Empty Table",
NULL, NULL,
NULL, NULL,
true true
); );
static MYSQL_THDVAR_BOOL(log_client_errors, static MYSQL_THDVAR_BOOL(log_client_errors,
0, 0,
"Tokudb Log Client Errors", "Tokudb Log Client Errors",
NULL, NULL,
NULL, NULL,
false false
); );
static MYSQL_THDVAR_UINT(block_size, static MYSQL_THDVAR_UINT(block_size,
0, 0,
"fractal tree block size", "fractal tree block size",
NULL, NULL,
NULL, NULL,
4<<20, // default 4<<20, // default
4096, // min 4096, // min
~0L, // max ~0L, // max
1 // blocksize??? 1 // blocksize???
); );
static MYSQL_THDVAR_UINT(read_block_size, static MYSQL_THDVAR_UINT(read_block_size,
0, 0,
"fractal tree read block size", "fractal tree read block size",
NULL, NULL,
NULL, NULL,
128*1024, // default 128*1024, // default
4096, // min 4096, // min
~0L, // max ~0L, // max
1 // blocksize??? 1 // blocksize???
); );
static MYSQL_THDVAR_UINT(read_buf_size, static MYSQL_THDVAR_UINT(read_buf_size,
0, 0,
"fractal tree read block size", //TODO: Is this a typo? "fractal tree read block size", //TODO: Is this a typo?
NULL, NULL,
NULL, NULL,
128*1024, // default 128*1024, // default
0, // min 0, // min
1*1024*1024, // max 1*1024*1024, // max
1 // blocksize??? 1 // blocksize???
); );
static void tokudb_checkpoint_lock(THD * thd); static void tokudb_checkpoint_lock(THD * thd);
static void tokudb_checkpoint_unlock(THD * thd); static void tokudb_checkpoint_unlock(THD * thd);
...@@ -160,12 +160,12 @@ tokudb_checkpoint_lock_update( ...@@ -160,12 +160,12 @@ tokudb_checkpoint_lock_update(
} }
static MYSQL_THDVAR_BOOL(checkpoint_lock, static MYSQL_THDVAR_BOOL(checkpoint_lock,
0, 0,
"Tokudb Checkpoint Lock", "Tokudb Checkpoint Lock",
NULL, NULL,
tokudb_checkpoint_lock_update, tokudb_checkpoint_lock_update,
false false
); );
static const char *tokudb_row_format_names[] = { static const char *tokudb_row_format_names[] = {
"tokudb_uncompressed", "tokudb_uncompressed",
...@@ -241,20 +241,17 @@ static ulong tokudb_cleaner_iterations; ...@@ -241,20 +241,17 @@ static ulong tokudb_cleaner_iterations;
void toku_hton_assert_fail(const char* expr_as_string, const char * fun, const char * file, int line, int caller_errno) { void toku_hton_assert_fail(const char* expr_as_string, const char * fun, const char * file, int line, int caller_errno) {
char msg[ASSERT_MSGLEN]; char msg[ASSERT_MSGLEN];
if (db_env) { if (db_env) {
snprintf(msg, ASSERT_MSGLEN, "Handlerton: %s ", expr_as_string); snprintf(msg, ASSERT_MSGLEN, "Handlerton: %s ", expr_as_string);
db_env->crash(db_env, msg, fun, file, line,caller_errno); db_env->crash(db_env, msg, fun, file, line,caller_errno);
} }
else { else {
snprintf(msg, ASSERT_MSGLEN, "Handlerton assertion failed, no env, %s, %d, %s, %s (errno=%d)\n", file, line, fun, expr_as_string, caller_errno); snprintf(msg, ASSERT_MSGLEN, "Handlerton assertion failed, no env, %s, %d, %s, %s (errno=%d)\n", file, line, fun, expr_as_string, caller_errno);
perror(msg); perror(msg);
fflush(stderr); fflush(stderr);
} }
abort(); abort();
} }
//my_bool tokudb_shared_data = false; //my_bool tokudb_shared_data = false;
static uint32_t tokudb_init_flags = static uint32_t tokudb_init_flags =
DB_CREATE | DB_THREAD | DB_PRIVATE | DB_CREATE | DB_THREAD | DB_PRIVATE |
...@@ -1009,9 +1006,9 @@ static int tokudb_release_savepoint(handlerton * hton, THD * thd, void *savepoin ...@@ -1009,9 +1006,9 @@ static int tokudb_release_savepoint(handlerton * hton, THD * thd, void *savepoin
} }
static int tokudb_discover(handlerton *hton, THD* thd, const char *db, static int tokudb_discover(handlerton *hton, THD* thd, const char *db,
const char *name, const char *name,
uchar **frmblob, uchar **frmblob,
size_t *frmlen) size_t *frmlen)
{ {
TOKUDB_DBUG_ENTER("tokudb_discover"); TOKUDB_DBUG_ENTER("tokudb_discover");
int error; int error;
...@@ -1319,9 +1316,9 @@ static bool tokudb_show_engine_status(THD * thd, stat_print_fn * stat_print) { ...@@ -1319,9 +1316,9 @@ static bool tokudb_show_engine_status(THD * thd, stat_print_fn * stat_print) {
#if MYSQL_VERSION_ID < 50500 #if MYSQL_VERSION_ID < 50500
{ {
sys_var * version = intern_find_sys_var("version", 0, false); sys_var * version = intern_find_sys_var("version", 0, false);
snprintf(buf, bufsiz, "%s", version->value_ptr(thd, (enum_var_type)0, (LEX_STRING*)NULL)); snprintf(buf, bufsiz, "%s", version->value_ptr(thd, (enum_var_type)0, (LEX_STRING*)NULL));
STATPRINT("Version", buf); STATPRINT("Version", buf);
} }
#endif #endif
error = db_env->get_engine_status_num_rows (db_env, &num_rows); error = db_env->get_engine_status_num_rows (db_env, &num_rows);
...@@ -1329,13 +1326,13 @@ static bool tokudb_show_engine_status(THD * thd, stat_print_fn * stat_print) { ...@@ -1329,13 +1326,13 @@ static bool tokudb_show_engine_status(THD * thd, stat_print_fn * stat_print) {
error = db_env->get_engine_status (db_env, mystat, num_rows, &redzone_state, &panic, panic_string, panic_string_len); error = db_env->get_engine_status (db_env, mystat, num_rows, &redzone_state, &panic, panic_string, panic_string_len);
if (strlen(panic_string)) { if (strlen(panic_string)) {
STATPRINT("Environment panic string", panic_string); STATPRINT("Environment panic string", panic_string);
} }
if (error == 0) { if (error == 0) {
if (panic) { if (panic) {
snprintf(buf, bufsiz, "%" PRIu64, panic); snprintf(buf, bufsiz, "%" PRIu64, panic);
STATPRINT("Environment panic", buf); STATPRINT("Environment panic", buf);
} }
if(redzone_state == FS_BLOCKED) { if(redzone_state == FS_BLOCKED) {
STATPRINT("*** URGENT WARNING ***", "FILE SYSTEM IS COMPLETELY FULL"); STATPRINT("*** URGENT WARNING ***", "FILE SYSTEM IS COMPLETELY FULL");
...@@ -1511,7 +1508,7 @@ static uint tokudb_alter_table_flags(uint flags) ...@@ -1511,7 +1508,7 @@ static uint tokudb_alter_table_flags(uint flags)
static uint tokudb_alter_table_flags(uint flags) { static uint tokudb_alter_table_flags(uint flags) {
return HA_INPLACE_ADD_INDEX_NO_READ_WRITE return HA_INPLACE_ADD_INDEX_NO_READ_WRITE
| HA_INPLACE_ADD_INDEX_NO_WRITE | HA_INPLACE_ADD_INDEX_NO_WRITE
| HA_INPLACE_DROP_INDEX_NO_READ_WRITE | HA_INPLACE_DROP_INDEX_NO_READ_WRITE
| HA_INPLACE_ADD_UNIQUE_INDEX_NO_READ_WRITE | HA_INPLACE_ADD_UNIQUE_INDEX_NO_READ_WRITE
| HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE | HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE
| HA_INPLACE_DROP_UNIQUE_INDEX_NO_READ_WRITE; | HA_INPLACE_DROP_UNIQUE_INDEX_NO_READ_WRITE;
......
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