Commit 3846dff8 authored by unknown's avatar unknown

some casts and simple fixes to fix compile errors in Visual 2005


sql/log_event.cc:
  some casts to make Visual 2005 happy
sql/log_event.h:
  actually return a bool expression instead of assuming a pointer 
  expression is boolean
sql/sql_class.cc:
  some casts to make Visual 2005 happy
sql/handler.cc:
  actually return 0 as the function docs say
parent 565e729e
......@@ -1178,6 +1178,7 @@ int ha_release_temporary_latches(THD *thd)
#ifdef WITH_INNOBASE_STORAGE_ENGINE
innobase_release_temporary_latches(thd);
#endif
return 0;
}
......
This diff is collapsed.
......@@ -1701,7 +1701,7 @@ class Table_map_log_event : public Log_event
~Table_map_log_event();
virtual Log_event_type get_type_code() { return TABLE_MAP_EVENT; }
virtual bool is_valid() const { return m_memory; /* we check malloc */ }
virtual bool is_valid() const { return m_memory != NULL; /* we check malloc */ }
virtual int get_data_size() { return m_data_size; }
#ifndef MYSQL_CLIENT
......
......@@ -2322,7 +2322,7 @@ my_size_t THD::pack_row(TABLE *table, MY_BITMAP const* cols, byte *row_data,
for (int i= 0 ; field ; i++, p_field++, field= *p_field)
{
if (bitmap_is_set(cols,i))
ptr= field->pack(ptr, field->ptr + offset);
ptr= (byte*)field->pack(ptr, field->ptr + offset);
}
/*
......@@ -2398,7 +2398,7 @@ int THD::binlog_update_row(TABLE* table, bool is_trans,
}
else
{
if (unlikely(!(row_data= my_multi_malloc(MYF(MY_WME),
if (unlikely(!(row_data= (byte*)my_multi_malloc(MYF(MY_WME),
&before_row, before_maxlen,
&after_row, after_maxlen,
NULL))))
......@@ -2420,7 +2420,7 @@ int THD::binlog_update_row(TABLE* table, bool is_trans,
if (!table->write_row_record)
{
/* add_row_data copies row_data to internal buffer */
my_free(row_data, MYF(MY_WME));
my_free((gptr)row_data, MYF(MY_WME));
}
return error;
......@@ -2439,7 +2439,7 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans,
bool error= 0;
my_size_t const max_len= max_row_length(table, record);
byte *row_data= table->write_row_record;
if (!row_data && unlikely(!(row_data= my_malloc(max_len, MYF(MY_WME)))))
if (!row_data && unlikely(!(row_data= (byte*)my_malloc(max_len, MYF(MY_WME)))))
return HA_ERR_OUT_OF_MEM;
my_size_t const len= pack_row(table, cols, row_data, record);
......@@ -2451,7 +2451,7 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans,
/* add_row_data copies row_data */
if (table->write_row_record == 0)
my_free(row_data, MYF(MY_WME));
my_free((gptr)row_data, MYF(MY_WME));
return error;
}
......
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