MDEV-9618 solaris sparc build fails on 10.1.

Compiler on Sparc is strict about the 'const' modifiers
    in function declarations and definitions. Meaning
    they should be exactly same.
This commit is contained in:
Alexey Botchkov 2016-06-27 18:02:28 +04:00
parent 652e799a38
commit 09d902d84b
6 changed files with 20 additions and 11 deletions

View File

@ -23,6 +23,7 @@ void wsrep_set_apply_format(THD* thd, Format_description_log_event* ev);
Format_description_log_event* wsrep_get_apply_format(THD* thd); Format_description_log_event* wsrep_get_apply_format(THD* thd);
/* wsrep callback prototypes */ /* wsrep callback prototypes */
extern "C" {
wsrep_cb_status_t wsrep_apply_cb(void *ctx, wsrep_cb_status_t wsrep_apply_cb(void *ctx,
const void* buf, size_t buf_len, const void* buf, size_t buf_len,
@ -39,4 +40,5 @@ wsrep_cb_status_t wsrep_unordered_cb(void* ctx,
const void* data, const void* data,
size_t size); size_t size);
} /* extern "C" */
#endif /* WSREP_APPLIER_H */ #endif /* WSREP_APPLIER_H */

View File

@ -38,10 +38,10 @@ int wsrep_write_cache_buf(IO_CACHE *cache, uchar **buf, size_t *buf_len);
@param len total amount of data written @param len total amount of data written
@return wsrep error status @return wsrep error status
*/ */
int wsrep_write_cache (wsrep_t* wsrep, int wsrep_write_cache (wsrep_t* const wsrep,
THD* thd, THD* const thd,
IO_CACHE* cache, IO_CACHE* const cache,
size_t* len); size_t* const len);
/* Dump replication buffer to disk */ /* Dump replication buffer to disk */
void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len); void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len);

View File

@ -40,8 +40,11 @@ extern wsrep_uuid_t local_uuid;
extern wsrep_seqno_t local_seqno; extern wsrep_seqno_t local_seqno;
// a helper function // a helper function
void wsrep_sst_received(wsrep_t*, const wsrep_uuid_t&, wsrep_seqno_t, void wsrep_sst_received (wsrep_t* const wsrep,
const void*, size_t); const wsrep_uuid_t& uuid,
wsrep_seqno_t const segno,
const void * const state,
size_t const state_len);
/*! SST thread signals init thread about sst completion */ /*! SST thread signals init thread about sst completion */
void wsrep_sst_complete(const wsrep_uuid_t*, wsrep_seqno_t, bool); void wsrep_sst_complete(const wsrep_uuid_t*, wsrep_seqno_t, bool);

View File

@ -19,7 +19,7 @@
#include "wsrep_priv.h" #include "wsrep_priv.h"
#include "wsrep_mysqld.h" #include "wsrep_mysqld.h"
unsigned int wsrep_check_ip (const char* addr, bool *is_ipv6); unsigned int wsrep_check_ip (const char* const addr, bool *is_ipv6);
size_t wsrep_guess_ip (char* buf, size_t buf_len); size_t wsrep_guess_ip (char* buf, size_t buf_len);
namespace wsp { namespace wsp {

View File

@ -289,8 +289,10 @@ innobase_casedn_str(
#ifdef WITH_WSREP #ifdef WITH_WSREP
UNIV_INTERN UNIV_INTERN
int int
wsrep_innobase_kill_one_trx(void *thd_ptr, wsrep_innobase_kill_one_trx(void * const thd_ptr,
const trx_t *bf_trx, trx_t *victim_trx, ibool signal); const trx_t * const bf_trx,
trx_t *victim_trx,
ibool signal);
int wsrep_innobase_mysql_sort(int mysql_type, uint charset_number, int wsrep_innobase_mysql_sort(int mysql_type, uint charset_number,
unsigned char* str, unsigned int str_length, unsigned char* str, unsigned int str_length,
unsigned int buf_length); unsigned int buf_length);

View File

@ -295,8 +295,10 @@ innobase_casedn_str(
#ifdef WITH_WSREP #ifdef WITH_WSREP
UNIV_INTERN UNIV_INTERN
int int
wsrep_innobase_kill_one_trx(void *thd_ptr, wsrep_innobase_kill_one_trx(void * const thd_ptr,
const trx_t *bf_trx, trx_t *victim_trx, ibool signal); const trx_t * const bf_trx,
trx_t *victim_trx,
ibool signal);
int wsrep_innobase_mysql_sort(int mysql_type, uint charset_number, int wsrep_innobase_mysql_sort(int mysql_type, uint charset_number,
unsigned char* str, unsigned int str_length, unsigned char* str, unsigned int str_length,
unsigned int buf_length); unsigned int buf_length);