summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_federated.cc2
-rw-r--r--sql/ha_innodb.cc2
-rw-r--r--sql/ha_myisammrg.cc2
-rw-r--r--sql/item_cmpfunc.cc2
-rw-r--r--sql/mysqld.cc13
-rw-r--r--sql/net_serv.cc4
-rw-r--r--sql/opt_range.cc6
-rw-r--r--sql/set_var.cc2
-rw-r--r--sql/slave.cc2
-rw-r--r--sql/sql_cache.cc6
-rw-r--r--sql/sql_select.cc2
11 files changed, 17 insertions, 26 deletions
diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc
index ac1e0962ffb..35648ea19c7 100644
--- a/sql/ha_federated.cc
+++ b/sql/ha_federated.cc
@@ -1088,7 +1088,7 @@ bool ha_federated::create_where_from_key(String *to,
uint store_length= key_part->store_length;
uint part_length= min(store_length, length);
needs_quotes= 1;
- DBUG_DUMP("key, start of loop", (char *) ptr, length);
+ DBUG_DUMP("key, start of loop", ptr, length);
if (key_part->null_bit)
{
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 2d2007c8fdd..a2de8ea1d0b 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -4250,7 +4250,7 @@ ha_innobase::rnd_pos(
int error;
uint keynr = active_index;
DBUG_ENTER("rnd_pos");
- DBUG_DUMP("key", (char*) pos, ref_length);
+ DBUG_DUMP("key", pos, ref_length);
statistic_increment(current_thd->status_var.ha_read_rnd_count,
&LOCK_status);
diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc
index 78492d2843d..02d0eaf2af3 100644
--- a/sql/ha_myisammrg.cc
+++ b/sql/ha_myisammrg.cc
@@ -126,7 +126,7 @@ int ha_myisammrg::open(const char *name, int mode, uint test_if_locked)
DBUG_PRINT("info", ("ha_myisammrg::open exit %d", my_errno));
return (my_errno ? my_errno : -1);
}
- DBUG_PRINT("info", ("ha_myisammrg::open myrg_extrafunc..."))
+ DBUG_PRINT("info", ("ha_myisammrg::open myrg_extrafunc..."));
myrg_extrafunc(file, query_cache_invalidate_by_MyISAM_filename_ref);
if (!(test_if_locked == HA_OPEN_WAIT_IF_LOCKED ||
test_if_locked == HA_OPEN_ABORT_IF_LOCKED))
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 17345e76bba..16f3e51d615 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -4130,7 +4130,7 @@ longlong Item_is_not_null_test::val_int()
}
if (args[0]->is_null())
{
- DBUG_PRINT("info", ("null"))
+ DBUG_PRINT("info", ("null"));
owner->was_null|= 1;
DBUG_RETURN(0);
}
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index b8df51e9e58..b8f675ff696 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1071,12 +1071,9 @@ pthread_handler_t kill_server_thread(void *arg __attribute__((unused)))
extern "C" sig_handler print_signal_warning(int sig)
{
- if (!DBUG_IN_USE)
- {
- if (global_system_variables.log_warnings)
- sql_print_warning("Got signal %d from thread %ld",
- sig, my_thread_id());
- }
+ if (global_system_variables.log_warnings)
+ sql_print_warning("Got signal %d from thread %ld",
+ sig, my_thread_id());
#ifdef DONT_REMEMBER_SIGNAL
my_sigset(sig,print_signal_warning); /* int. thread system calls */
#endif
@@ -1718,7 +1715,7 @@ void end_thread(THD *thd, bool put_in_cache)
! abort_loop && !kill_cached_threads)
{
/* Don't kill the thread, just put it in cache for reuse */
- DBUG_PRINT("info", ("Adding thread to cache"))
+ DBUG_PRINT("info", ("Adding thread to cache"));
cached_thread_count++;
while (!abort_loop && ! wake_thread && ! kill_cached_threads)
(void) pthread_cond_wait(&COND_thread_cache, &LOCK_thread_count);
@@ -3623,8 +3620,6 @@ int main(int argc, char **argv)
MY_INIT(argv[0]); // init my_sys library & pthreads
/* ^^^ Nothing should be before this line! */
- DEBUGGER_OFF;
-
/* Set signal used to kill MySQL */
#if defined(SIGUSR2)
thr_kill_signal= thd_lib_detected == THD_LIB_LT ? SIGINT : SIGUSR2;
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 017a2eb9ecd..a40764577fd 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -394,7 +394,7 @@ my_net_write(NET *net,const char *packet,ulong len)
if (net_write_buff(net,(char*) buff,NET_HEADER_SIZE))
return 1;
#ifndef DEBUG_DATA_PACKETS
- DBUG_DUMP("packet_header",(char*) buff,NET_HEADER_SIZE);
+ DBUG_DUMP("packet_header", buff, NET_HEADER_SIZE);
#endif
return test(net_write_buff(net,packet,len));
}
@@ -892,7 +892,7 @@ my_real_read(NET *net, ulong *complen)
if (i == 0)
{ /* First parts is packet length */
ulong helping;
- DBUG_DUMP("packet_header",(char*) net->buff+net->where_b,
+ DBUG_DUMP("packet_header", net->buff+net->where_b,
NET_HEADER_SIZE);
if (net->buff[net->where_b + 3] != (uchar) net->pkt_nr)
{
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index c3eddbd0abf..17a4701b515 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -9570,8 +9570,6 @@ static void print_sel_tree(PARAM *param, SEL_TREE *tree, key_map *tree_map,
int idx;
char buff[1024];
DBUG_ENTER("print_sel_tree");
- if (! _db_on_)
- DBUG_VOID_RETURN;
String tmp(buff,sizeof(buff),&my_charset_bin);
tmp.length(0);
@@ -9601,8 +9599,6 @@ static void print_ror_scans_arr(TABLE *table, const char *msg,
struct st_ror_scan_info **end)
{
DBUG_ENTER("print_ror_scans");
- if (! _db_on_)
- DBUG_VOID_RETURN;
char buff[1024];
String tmp(buff,sizeof(buff),&my_charset_bin);
@@ -9665,7 +9661,7 @@ static void print_quick(QUICK_SELECT_I *quick, const key_map *needed_reg)
{
char buf[MAX_KEY/8+1];
DBUG_ENTER("print_quick");
- if (! _db_on_ || !quick)
+ if (!quick)
DBUG_VOID_RETURN;
DBUG_LOCK_FILE;
diff --git a/sql/set_var.cc b/sql/set_var.cc
index a99b063a97e..84766e511ca 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -1990,7 +1990,7 @@ void sys_var_thd_date_time_format::update2(THD *thd, enum_var_type type,
{
DATE_TIME_FORMAT *old;
DBUG_ENTER("sys_var_date_time_format::update2");
- DBUG_DUMP("positions",(char*) new_value->positions,
+ DBUG_DUMP("positions", new_value->positions,
sizeof(new_value->positions));
if (type == OPT_GLOBAL)
diff --git a/sql/slave.cc b/sql/slave.cc
index 8a3620080f2..2cd4b00cca9 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -3339,7 +3339,7 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
}
DBUG_PRINT("info", ("thd->options: %s",
- (thd->options & OPTION_BEGIN) ? "OPTION_BEGIN" : ""))
+ (thd->options & OPTION_BEGIN) ? "OPTION_BEGIN" : ""));
/*
Protect against common user error of setting the counter to 1
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 8c868971911..f8906a17c12 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -315,13 +315,13 @@ TODO list:
#define MUTEX_UNLOCK(M) {DBUG_PRINT("lock", ("mutex unlock 0x%lx",\
(ulong)(M))); pthread_mutex_unlock(M);}
#define RW_WLOCK(M) {DBUG_PRINT("lock", ("rwlock wlock 0x%lx",(ulong)(M))); \
- if (!rw_wrlock(M)) DBUG_PRINT("lock", ("rwlock wlock ok")) \
+ if (!rw_wrlock(M)) DBUG_PRINT("lock", ("rwlock wlock ok")); \
else DBUG_PRINT("lock", ("rwlock wlock FAILED %d", errno)); }
#define RW_RLOCK(M) {DBUG_PRINT("lock", ("rwlock rlock 0x%lx", (ulong)(M))); \
- if (!rw_rdlock(M)) DBUG_PRINT("lock", ("rwlock rlock ok")) \
+ if (!rw_rdlock(M)) DBUG_PRINT("lock", ("rwlock rlock ok")); \
else DBUG_PRINT("lock", ("rwlock wlock FAILED %d", errno)); }
#define RW_UNLOCK(M) {DBUG_PRINT("lock", ("rwlock unlock 0x%lx",(ulong)(M))); \
- if (!rw_unlock(M)) DBUG_PRINT("lock", ("rwlock unlock ok")) \
+ if (!rw_unlock(M)) DBUG_PRINT("lock", ("rwlock unlock ok")); \
else DBUG_PRINT("lock", ("rwlock unlock FAILED %d", errno)); }
#define STRUCT_LOCK(M) {DBUG_PRINT("lock", ("%d struct lock...",__LINE__)); \
pthread_mutex_lock(M);DBUG_PRINT("lock", ("struct lock OK"));}
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 6392f7c4299..ef3abb06b1e 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -14470,7 +14470,7 @@ change_to_use_tmp_fields(THD *thd, Item **ref_pointer_array,
ifield->db_name= iref->db_name;
}
#ifndef DBUG_OFF
- if (_db_on_ && !item_field->name)
+ if (!item_field->name)
{
char buff[256];
String str(buff,sizeof(buff),&my_charset_bin);