Commit f96d8878 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 1e3cee75
......@@ -7761,7 +7761,9 @@ void ha_tokudb::print_error(int error, myf errflag) {
#if MYSQL_VERSION_ID < 50500
if ((tokudb_debug & TOKUDB_DEBUG_HIDE_DDL_LOCK_ERRORS) == 0) {
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
handler::print_error(error, errflag);
......
......@@ -107,6 +107,13 @@ static MYSQL_THDVAR_BOOL(prelock_empty,
NULL,
TRUE
);
static MYSQL_THDVAR_BOOL(log_client_errors,
0,
"Tokudb Log Client Errors",
NULL,
NULL,
FALSE
);
static MYSQL_THDVAR_UINT(block_size,
0,
"fractal tree block size",
......@@ -666,6 +673,10 @@ bool get_prelock_empty(THD* thd) {
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) {
return THDVAR(thd, block_size);
}
......@@ -1458,6 +1469,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = {
MYSQL_SYSVAR(init_flags),
MYSQL_SYSVAR(checkpointing_period),
MYSQL_SYSVAR(prelock_empty),
MYSQL_SYSVAR(log_client_errors),
MYSQL_SYSVAR(checkpoint_lock),
MYSQL_SYSVAR(write_status_frequency),
MYSQL_SYSVAR(read_status_frequency),
......
......@@ -16,6 +16,7 @@ bool get_disable_slow_alter(THD* thd);
bool get_create_index_online(THD* thd);
bool get_disable_prefetching(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_read_block_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