summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorunknown <aivanov@mysql.com>2006-01-15 15:47:27 +0300
committerunknown <aivanov@mysql.com>2006-01-15 15:47:27 +0300
commit8e9cabb1f8c9cfcdde73a0a48e0742c77d38a3a1 (patch)
tree89f67ac61bf6230f00dc8278dd0c4b2b3aac6c6c /sql/sql_class.cc
parent53462e3be3ed29dd81817ee6e5926d1afd1b624d (diff)
downloadmariadb-git-8e9cabb1f8c9cfcdde73a0a48e0742c77d38a3a1.tar.gz
Changes to avoid compilation errors in MS Visual Studio 7.1
(reviewed by Mats) sql/log_event.cc: Changes to avoid compilation errors in MS Visual Studio 7.1 sql/sql_class.cc: Changes to avoid compilation errors in MS Visual Studio 7.1
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 2f392f46627..a1fefea6807 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -2325,7 +2325,7 @@ my_size_t THD::max_row_length_blob(TABLE *table, const byte *data) const
for (uint *ptr= beg ; ptr != end ; ++ptr)
{
Field_blob* const blob= (Field_blob*) table->field[*ptr];
- length+= blob->get_length(data + blob->offset()) + 2;
+ length+= blob->get_length((const char *) (data + blob->offset())) + 2;
}
return length;
@@ -2344,7 +2344,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= (byte*)field->pack(ptr, field->ptr + offset);
+ ptr= (byte*)field->pack((char *) ptr, field->ptr + offset);
}
/*
@@ -2377,12 +2377,12 @@ int THD::binlog_write_row(TABLE* table, bool is_trans,
if (!table->s->blob_fields)
{
/* multiply max_len by 2 so it can be used for update_row as well */
- table->write_row_record= alloc_root(&table->mem_root, 2*max_len);
+ table->write_row_record= (byte *) alloc_root(&table->mem_root, 2*max_len);
if (!table->write_row_record)
return HA_ERR_OUT_OF_MEM;
row_data= table->write_row_record;
}
- else if (unlikely(!(row_data= my_malloc(max_len, MYF(MY_WME)))))
+ else if (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);
@@ -2396,7 +2396,7 @@ int THD::binlog_write_row(TABLE* table, bool is_trans,
error= likely(ev != 0) ? ev->add_row_data(row_data,len) : HA_ERR_OUT_OF_MEM ;
if (table->write_row_record == 0)
- my_free(row_data, MYF(MY_WME));
+ my_free((gptr) row_data, MYF(MY_WME));
return error;
}