Commit a8bcc697 authored by unknown's avatar unknown

Fixes to make it compile when using Sun CC and restoring some changes

done in previous patches.

There is an error in the Sun CC compiler that treats parameters that
differ in only qualifier as different, even though this is not
allowed by the standard (ISO/IEC 14882:2003, Section 13.1).


sql/log_event.cc:
  Removing const qualifier since it causes linker error.
sql/log_event.h:
  Restoring time_t instead of my_time_t since it causes warnings
  elsewhere.  Renaming parameters to functions since they hide
  member variable (which causes warnings on Sun CC).
sql/rpl_record.cc:
  Removing const qualifier since it causes linker error.
sql/rpl_rli.cc:
  Restoring time_t instead of my_time_t since it causes warnings
  elsewhere. Removing const qualifier since it causes linker error.
sql/rpl_rli.h:
  Restoring time_t instead of my_time_t since it causes warnings
  elsewhere. Removing const qualifier since it causes linker error.
parent 461608cc
......@@ -5753,8 +5753,7 @@ int Rows_log_event::get_data_size()
#ifndef MYSQL_CLIENT
int Rows_log_event::do_add_row_data(byte *const row_data,
my_size_t const length)
int Rows_log_event::do_add_row_data(byte *row_data, my_size_t length)
{
/*
When the table has a primary key, we would probably want, by default, to
......
......@@ -669,7 +669,7 @@ class Log_event
execution time, which guarantees good replication (otherwise, we
could have a query and its event with different timestamps).
*/
my_time_t when;
time_t when;
/* The number of seconds the query took to run on the master. */
ulong exec_time;
/* Number of bytes written by write() function */
......@@ -2146,9 +2146,9 @@ class Rows_log_event : public Log_event
virtual ~Rows_log_event();
void set_flags(flag_set flags) { m_flags |= flags; }
void clear_flags(flag_set flags) { m_flags &= ~flags; }
flag_set get_flags(flag_set flags) const { return m_flags & flags; }
void set_flags(flag_set flags_arg) { m_flags |= flags_arg; }
void clear_flags(flag_set flags_arg) { m_flags &= ~flags_arg; }
flag_set get_flags(flag_set flags_arg) const { return m_flags & flags_arg; }
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
virtual void pack_info(Protocol *protocol);
......
......@@ -50,9 +50,10 @@
@return The number of bytes written at @c row_data.
*/
#if !defined(MYSQL_CLIENT)
my_size_t
pack_row(TABLE *table, MY_BITMAP const* cols,
byte *const row_data, const byte *record)
byte *row_data, const byte *record)
{
Field **p_field= table->field, *field;
int const null_byte_count= (bitmap_bits_set(cols) + 7) / 8;
......@@ -120,6 +121,7 @@ pack_row(TABLE *table, MY_BITMAP const* cols,
return static_cast<my_size_t>(pack_ptr - row_data);
}
#endif
/**
......@@ -158,7 +160,7 @@ pack_row(TABLE *table, MY_BITMAP const* cols,
master does not have a default value (and isn't nullable)
*/
#ifdef HAVE_REPLICATION
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
int
unpack_row(RELAY_LOG_INFO const *rli,
TABLE *table, uint const colcnt,
......
......@@ -1087,8 +1087,8 @@ bool st_relay_log_info::cached_charset_compare(char *charset) const
}
void st_relay_log_info::stmt_done(my_off_t const event_master_log_pos,
my_time_t event_creation_time)
void st_relay_log_info::stmt_done(my_off_t event_master_log_pos,
time_t event_creation_time)
{
clear_flag(IN_STMT);
......
......@@ -184,7 +184,7 @@ typedef struct st_relay_log_info
ulonglong future_group_master_log_pos;
#endif
my_time_t last_master_timestamp;
time_t last_master_timestamp;
void clear_slave_error();
void clear_until_condition();
......@@ -345,7 +345,7 @@ typedef struct st_relay_log_info
the <code>Seconds_behind_master</code> field.
*/
void stmt_done(my_off_t event_log_pos,
my_time_t event_creation_time);
time_t event_creation_time);
/**
......
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