summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-03-20 16:27:53 +0200
committerGeorgi Kodinov <joro@sun.com>2009-03-20 16:27:53 +0200
commitef4ab5cfaa7ab48b4fa3a147e4d6c5c29b1be645 (patch)
treeb7dcdd9f750b94c728ed5e3feed722a8809775ad /sql
parent4a3c0d800ac2670f94756f32213bf8f3b3dd2c4b (diff)
downloadmariadb-git-ef4ab5cfaa7ab48b4fa3a147e4d6c5c29b1be645.tar.gz
fixed compilation warnings. addendum to the fix for bug 29125
Diffstat (limited to 'sql')
-rw-r--r--sql/log_event.cc3
-rw-r--r--sql/sql_cache.cc4
-rw-r--r--sql/sql_servers.cc4
-rw-r--r--sql/sql_view.cc3
4 files changed, 6 insertions, 8 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index a222534e8b7..dc886aa3309 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1289,7 +1289,6 @@ void Log_event::print_header(IO_CACHE* file,
ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6],
ptr[7], ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13],
ptr[14], ptr[15], ptr[16], ptr[17], ptr[18]);
- DBUG_ASSERT(bytes_written >= 0);
DBUG_ASSERT(static_cast<size_t>(bytes_written) < sizeof(emit_buf));
my_b_write(file, (uchar*) emit_buf, bytes_written);
ptr += LOG_EVENT_MINIMAL_HEADER_LEN;
@@ -1320,7 +1319,6 @@ void Log_event::print_header(IO_CACHE* file,
"# %8.8lx %-48.48s |%16s|\n",
(unsigned long) (hexdump_from + (i & 0xfffffff0)),
hex_string, char_string);
- DBUG_ASSERT(bytes_written >= 0);
DBUG_ASSERT(static_cast<size_t>(bytes_written) < sizeof(emit_buf));
my_b_write(file, (uchar*) emit_buf, bytes_written);
hex_string[0]= 0;
@@ -1340,7 +1338,6 @@ void Log_event::print_header(IO_CACHE* file,
"# %8.8lx %-48.48s |%s|\n",
(unsigned long) (hexdump_from + (i & 0xfffffff0)),
hex_string, char_string);
- DBUG_ASSERT(bytes_written >= 0);
DBUG_ASSERT(static_cast<size_t>(bytes_written) < sizeof(emit_buf));
my_b_write(file, (uchar*) emit_buf, bytes_written);
}
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 25907d4ec20..32faeae9dcc 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -1114,7 +1114,7 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d",
{
memcpy(thd->query+thd->query_length+1, thd->db, thd->db_length);
DBUG_PRINT("qcache", ("database: %s length: %u",
- thd->db, thd->db_length));
+ thd->db, (unsigned) thd->db_length));
}
else
{
@@ -1307,7 +1307,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
{
memcpy(sql+query_length+1, thd->db, thd->db_length);
DBUG_PRINT("qcache", ("database: '%s' length: %u",
- thd->db, thd->db_length));
+ thd->db, (unsigned)thd->db_length));
}
else
{
diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc
index b1c856c87aa..f8a8dea18ff 100644
--- a/sql/sql_servers.cc
+++ b/sql/sql_servers.cc
@@ -1290,8 +1290,8 @@ FOREIGN_SERVER *get_server_by_name(MEM_ROOT *mem, const char *server_name,
(uchar*) server_name,
server_name_length)))
{
- DBUG_PRINT("info", ("server_name %s length %d not found!",
- server_name, server_name_length));
+ DBUG_PRINT("info", ("server_name %s length %u not found!",
+ server_name, (unsigned) server_name_length));
server= (FOREIGN_SERVER *) NULL;
}
/* otherwise, make copy of server */
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index 96448f7e5c2..65157ae4255 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -61,7 +61,8 @@ static void make_unique_view_field_name(Item *target,
char *name= (target->orig_name ?
target->orig_name :
target->name);
- size_t name_len, attempt;
+ size_t name_len;
+ uint attempt;
char buff[NAME_LEN+1];
List_iterator_fast<Item> itc(item_list);