summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <mats@capulet.net>2007-04-13 19:19:10 +0200
committerunknown <mats@capulet.net>2007-04-13 19:19:10 +0200
commita8bcc697ce536fe3d000ef25bd1748dbef09479b (patch)
treedfcfc23c624a6dc46a2d25f6752bd6e105361fdc /sql
parent461608cc6067dbdeadf9c05ee27e42586c71b11d (diff)
downloadmariadb-git-a8bcc697ce536fe3d000ef25bd1748dbef09479b.tar.gz
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.
Diffstat (limited to 'sql')
-rw-r--r--sql/log_event.cc3
-rw-r--r--sql/log_event.h8
-rw-r--r--sql/rpl_record.cc6
-rw-r--r--sql/rpl_rli.cc4
-rw-r--r--sql/rpl_rli.h4
5 files changed, 13 insertions, 12 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index b67629a2c08..e53cbd310ea 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -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
diff --git a/sql/log_event.h b/sql/log_event.h
index 7039ef42f1f..4e43822cb38 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -669,7 +669,7 @@ public:
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 @@ public:
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);
diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc
index 414572027b6..4c6686cf446 100644
--- a/sql/rpl_record.cc
+++ b/sql/rpl_record.cc
@@ -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,
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index 57de3bc6838..702dec72f56 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -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);
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h
index 7727c35ae53..fada45722f6 100644
--- a/sql/rpl_rli.h
+++ b/sql/rpl_rli.h
@@ -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);
/**