1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fixning compiler warnings. Fixing build failure for valgrind platform.

include/my_global.h:
  Moving YESNO() macro here from log.cc (it prints either "yes" or "no" depending on a boolean value).
sql/log.cc:
  Moving YESNO() function to my_global.h.
sql/sql_class.cc:
  Adding default case to printout function to avoid warning.
  Only defining function for debug builds since it isn't used 
  in non-debug build (hence produce a warning).
sql/sql_class.h:
  Printing yes/no answer instead of memory address since the
  case produces an error/warning on valgrind platform.
This commit is contained in:
Mats Kindahl
2008-08-22 12:40:21 +02:00
parent 7207b18b25
commit 8b637b2847
4 changed files with 11 additions and 8 deletions

View File

@@ -3528,22 +3528,24 @@ int THD::binlog_flush_pending_rows_event(bool stmt_end)
}
#ifndef DBUG_OFF
static const char *
show_query_type(THD::enum_binlog_query_type qtype)
{
switch (qtype) {
static char buf[64];
case THD::ROW_QUERY_TYPE:
return "ROW";
case THD::STMT_QUERY_TYPE:
return "STMT";
case THD::MYSQL_QUERY_TYPE:
return "MYSQL";
default:
sprintf(buf, "UNKNOWN#%d", qtype);
return buf;
}
static char buf[64];
sprintf(buf, "UNKNOWN#%d", qtype);
return buf;
}
#endif
/*