Commit 1d5a5ae0 authored by unknown's avatar unknown

Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  mysql.com:/home/alexi/dev/mysql-5.1-studio


sql/log_event.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
parents eade034f 8e9cabb1
......@@ -5123,7 +5123,7 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
const uint byte_count= (m_width + 7) / 8;
const byte* const ptr_rows_data= var_start + byte_count + 1;
my_size_t const data_size= event_len - (ptr_rows_data - buf);
my_size_t const data_size= event_len - (ptr_rows_data - (const byte *) buf);
DBUG_PRINT("info",("m_table_id=%lu, m_flags=%d, m_width=%u, data_size=%lu",
m_table_id, m_flags, m_width, data_size));
......@@ -6038,7 +6038,7 @@ bool Table_map_log_event::write_data_body(IO_CACHE *file)
DBUG_ASSERT(static_cast<my_size_t>(cbuf_end - cbuf) <= sizeof(cbuf));
return (my_b_safe_write(file, dbuf, sizeof(dbuf)) ||
my_b_safe_write(file, m_dbnam, m_dblen+1) ||
my_b_safe_write(file, (const byte*)m_dbnam, m_dblen+1) ||
my_b_safe_write(file, tbuf, sizeof(tbuf)) ||
my_b_safe_write(file, (const byte*)m_tblnam, m_tbllen+1) ||
my_b_safe_write(file, cbuf, cbuf_end - cbuf) ||
......@@ -6056,7 +6056,7 @@ bool Table_map_log_event::write_data_body(IO_CACHE *file)
void Table_map_log_event::pack_info(Protocol *protocol)
{
char buf[256];
my_size_t bytes= snprintf(buf, sizeof(buf), "%s.%s", m_dbnam, m_tblnam);
my_size_t bytes= my_snprintf(buf, sizeof(buf), "%s.%s", m_dbnam, m_tblnam);
protocol->store(buf, bytes, &my_charset_bin);
}
......@@ -6171,7 +6171,7 @@ char const *Write_rows_log_event::do_prepare_row(THD *thd, TABLE *table,
*/
DBUG_ASSERT(table->s->fields >= m_width);
DBUG_ASSERT(ptr);
ptr= unpack_row(table, (char*)table->record[0], ptr, &m_cols);
ptr= unpack_row(table, table->record[0], ptr, &m_cols);
return ptr;
}
......
......@@ -2330,7 +2330,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;
......@@ -2349,7 +2349,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);
}
/*
......@@ -2382,12 +2382,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);
......@@ -2401,7 +2401,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;
}
......
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