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

[t:4544], create variable tokudb_log_client_errors to control whether client errors get logged

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@41218 c7de825b-a66e-492c-adef-691d508d4ae1
parent 84896cc7
...@@ -7761,7 +7761,9 @@ void ha_tokudb::print_error(int error, myf errflag) { ...@@ -7761,7 +7761,9 @@ void ha_tokudb::print_error(int error, myf errflag) {
#if MYSQL_VERSION_ID < 50500 #if MYSQL_VERSION_ID < 50500
if ((tokudb_debug & TOKUDB_DEBUG_HIDE_DDL_LOCK_ERRORS) == 0) { if ((tokudb_debug & TOKUDB_DEBUG_HIDE_DDL_LOCK_ERRORS) == 0) {
THD* thd = ha_thd(); THD* thd = ha_thd();
sql_print_error("query \"%s\" returned handler error %d", thd->query_string.str, error); if (get_log_client_errors(thd)) {
sql_print_error("query \"%s\" returned handler error %d", thd->query_string.str, error);
}
} }
#endif #endif
handler::print_error(error, errflag); handler::print_error(error, errflag);
......
...@@ -107,6 +107,13 @@ static MYSQL_THDVAR_BOOL(prelock_empty, ...@@ -107,6 +107,13 @@ static MYSQL_THDVAR_BOOL(prelock_empty,
NULL, NULL,
TRUE TRUE
); );
static MYSQL_THDVAR_BOOL(log_client_errors,
0,
"Tokudb Log Client Errors",
NULL,
NULL,
FALSE
);
static MYSQL_THDVAR_UINT(block_size, static MYSQL_THDVAR_UINT(block_size,
0, 0,
"fractal tree block size", "fractal tree block size",
...@@ -666,6 +673,10 @@ bool get_prelock_empty(THD* thd) { ...@@ -666,6 +673,10 @@ bool get_prelock_empty(THD* thd) {
return (THDVAR(thd, prelock_empty) != 0); return (THDVAR(thd, prelock_empty) != 0);
} }
bool get_log_client_errors(THD* thd) {
return (THDVAR(thd, log_client_errors) != 0);
}
uint get_tokudb_block_size(THD* thd) { uint get_tokudb_block_size(THD* thd) {
return THDVAR(thd, block_size); return THDVAR(thd, block_size);
} }
...@@ -1458,6 +1469,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = { ...@@ -1458,6 +1469,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = {
MYSQL_SYSVAR(init_flags), MYSQL_SYSVAR(init_flags),
MYSQL_SYSVAR(checkpointing_period), MYSQL_SYSVAR(checkpointing_period),
MYSQL_SYSVAR(prelock_empty), MYSQL_SYSVAR(prelock_empty),
MYSQL_SYSVAR(log_client_errors),
MYSQL_SYSVAR(checkpoint_lock), MYSQL_SYSVAR(checkpoint_lock),
MYSQL_SYSVAR(write_status_frequency), MYSQL_SYSVAR(write_status_frequency),
MYSQL_SYSVAR(read_status_frequency), MYSQL_SYSVAR(read_status_frequency),
......
...@@ -16,6 +16,7 @@ bool get_disable_slow_alter(THD* thd); ...@@ -16,6 +16,7 @@ bool get_disable_slow_alter(THD* thd);
bool get_create_index_online(THD* thd); bool get_create_index_online(THD* thd);
bool get_disable_prefetching(THD* thd); bool get_disable_prefetching(THD* thd);
bool get_prelock_empty(THD* thd); bool get_prelock_empty(THD* thd);
bool get_log_client_errors(THD* thd);
uint get_tokudb_block_size(THD* thd); uint get_tokudb_block_size(THD* thd);
uint get_tokudb_read_block_size(THD* thd); uint get_tokudb_read_block_size(THD* thd);
uint get_tokudb_read_buf_size(THD* thd); uint get_tokudb_read_buf_size(THD* thd);
......
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