From 94d3a8e050e6521c5aae071df40781a6db9f4248 Mon Sep 17 00:00:00 2001 From: "mats@mysql.com" <> Date: Mon, 9 Jan 2006 15:59:39 +0100 Subject: [PATCH] Changes to support aCC on HP-UX. --- sql/log_event.h | 5 ++++- sql/sql_class.cc | 39 +++++++++++++++++++++++---------------- sql/sql_class.h | 3 ++- 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/sql/log_event.h b/sql/log_event.h index 5d58a204ec9..3ddf177a9cf 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -1673,8 +1673,11 @@ public: { /* Nothing here right now, but the flags support is there in - preparation for changes that are coming. + preparation for changes that are coming. Need to add a + constant to make it compile under HP-UX: aCC does not like + empty enumerations. */ + ENUM_FLAG_COUNT }; typedef uint16 flag_set; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 853e8be6629..5b095bb29d3 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -2173,7 +2173,8 @@ THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id, MY_BITMAP const* cols, my_size_t colcnt, my_size_t needed, - bool is_transactional) + bool is_transactional, + RowsEventT *hint __attribute__((unused))) { /* Pre-conditions */ DBUG_ASSERT(table->s->table_map_id != ULONG_MAX); @@ -2238,16 +2239,19 @@ THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id, compiling option. */ template Rows_log_event* -THD::binlog_prepare_pending_rows_event -(TABLE*, uint32, MY_BITMAP const*, my_size_t colcnt, size_t, bool); +THD::binlog_prepare_pending_rows_event(TABLE*, uint32, MY_BITMAP const*, + my_size_t, my_size_t, bool, + Write_rows_log_event*); template Rows_log_event* -THD::binlog_prepare_pending_rows_event -(TABLE*, uint32, MY_BITMAP const*, my_size_t colcnt, size_t, bool); +THD::binlog_prepare_pending_rows_event(TABLE*, uint32, MY_BITMAP const*, + my_size_t colcnt, my_size_t, bool, + Delete_rows_log_event *); template Rows_log_event* -THD::binlog_prepare_pending_rows_event -(TABLE*, uint32, MY_BITMAP const*, my_size_t colcnt, size_t, bool); +THD::binlog_prepare_pending_rows_event(TABLE*, uint32, MY_BITMAP const*, + my_size_t colcnt, my_size_t, bool, + Update_rows_log_event *); static char const* field_type_name(enum_field_types type) @@ -2384,9 +2388,10 @@ int THD::binlog_write_row(TABLE* table, bool is_trans, } my_size_t const len= pack_row(table, cols, row_data, record); - Rows_log_event* const - ev= binlog_prepare_pending_rows_event - (table, server_id, cols, colcnt, len, is_trans); + Rows_log_event* const ev= + binlog_prepare_pending_rows_event(table, server_id, cols, colcnt, + len, is_trans, + static_cast(0)); /* add_row_data copies row_data to internal buffer */ error= likely(ev != 0) ? ev->add_row_data(row_data,len) : HA_ERR_OUT_OF_MEM ; @@ -2429,9 +2434,10 @@ int THD::binlog_update_row(TABLE* table, bool is_trans, my_size_t const after_size= pack_row(table, cols, after_row, after_record); - Rows_log_event* const - ev= binlog_prepare_pending_rows_event - (table, server_id, cols, colcnt, before_size + after_size, is_trans); + Rows_log_event* const ev= + binlog_prepare_pending_rows_event(table, server_id, cols, colcnt, + before_size + after_size, is_trans, + static_cast(0)); error= (unlikely(!ev)) || ev->add_row_data(before_row, before_size) || ev->add_row_data(after_row, after_size); @@ -2462,9 +2468,10 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans, return HA_ERR_OUT_OF_MEM; my_size_t const len= pack_row(table, cols, row_data, record); - Rows_log_event* const - ev= binlog_prepare_pending_rows_event - (table, server_id, cols, colcnt, len, is_trans); + Rows_log_event* const ev= + binlog_prepare_pending_rows_event(table, server_id, cols, colcnt, + len, is_trans, + static_cast(0)); error= (unlikely(!ev)) || ev->add_row_data(row_data, len); diff --git a/sql/sql_class.h b/sql/sql_class.h index 1ef3322bc8f..c56924774ba 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -922,7 +922,8 @@ public: MY_BITMAP const* cols, my_size_t colcnt, my_size_t needed, - bool is_transactional); + bool is_transactional, + RowsEventT* hint); Rows_log_event* binlog_get_pending_rows_event() const; void binlog_set_pending_rows_event(Rows_log_event* ev); int binlog_setup_trx_data();