Fixed problem when compiling libmysqld (without replication)

This change allows us to use the stmt_binlog function in the code without ifdefs
(We should avoid having ifdefs in the .cc and .c files)
This commit is contained in:
monty@mysql.com 2006-06-23 03:21:12 +03:00
parent a168d1396c
commit fba475cc47
2 changed files with 12 additions and 8 deletions

View file

@ -1646,10 +1646,10 @@ void ha_binlog_log_query(THD *thd, const handlerton *db_type,
void ha_binlog_wait(THD *thd);
int ha_binlog_end(THD *thd);
#else
#define ha_reset_logs(a) 0
#define ha_binlog_index_purge_file(a,b) 0
#define ha_reset_slave(a)
#define ha_binlog_log_query(a,b,c,d,e,f,g);
#define ha_binlog_wait(a)
#define ha_binlog_end(a) 0
#define ha_reset_logs(a) do {} while (0)
#define ha_binlog_index_purge_file(a,b) do {} while (0)
#define ha_reset_slave(a) do {} while (0)
#define ha_binlog_log_query(a,b,c,d,e,f,g) do {} while (0)
#define ha_binlog_wait(a) do {} while (0)
#define ha_binlog_end(a) do {} while (0)
#endif

View file

@ -1415,21 +1415,25 @@ public:
void restore_sub_statement_state(Sub_statement_state *backup);
void set_n_backup_active_arena(Query_arena *set, Query_arena *backup);
void restore_active_arena(Query_arena *set, Query_arena *backup);
#ifdef HAVE_ROW_BASED_REPLICATION
inline void set_current_stmt_binlog_row_based_if_mixed()
{
#ifdef HAVE_ROW_BASED_REPLICATION
if (variables.binlog_format == BINLOG_FORMAT_MIXED)
current_stmt_binlog_row_based= TRUE;
#endif
}
inline void set_current_stmt_binlog_row_based()
{
#ifdef HAVE_ROW_BASED_REPLICATION
current_stmt_binlog_row_based= TRUE;
#endif
}
inline void clear_current_stmt_binlog_row_based()
{
#ifdef HAVE_ROW_BASED_REPLICATION
current_stmt_binlog_row_based= FALSE;
}
#endif
}
inline void reset_current_stmt_binlog_row_based()
{
#ifdef HAVE_ROW_BASED_REPLICATION