From dd918a71d4da41011ebd9e00f225bb1e82630028 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Jan 2006 11:08:23 +0100 Subject: [PATCH] Fix template problem with Sun compiler by using anonymous namespace instead of static for referenged function. --- sql/handler.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sql/handler.cc b/sql/handler.cc index 8befec80529..ae38e376d54 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2794,13 +2794,18 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat) */ #ifdef HAVE_ROW_BASED_REPLICATION -static bool check_table_binlog_row_based(THD *thd, TABLE *table) -{ - return - binlog_row_based && - thd && (thd->options & OPTION_BIN_LOG) && - (table->s->tmp_table == NO_TMP_TABLE) && - binlog_filter->db_ok(table->s->db.str); +/* The Sun compiler cannot instantiate the template below if this is + declared static, but it works by putting it into an anonymous + namespace. */ +namespace { + bool check_table_binlog_row_based(THD *thd, TABLE *table) + { + return + binlog_row_based && + thd && (thd->options & OPTION_BIN_LOG) && + (table->s->tmp_table == NO_TMP_TABLE) && + binlog_filter->db_ok(table->s->db.str); + } } template int binlog_log_row(TABLE* table,