Browse Source

branches/zip: Exclude thd_binlog_filter_ok() when building

with older version of MySQL.

thd_binlog_filter_ok() is introduced in MySQL 5.1.41. But the
plugin can be built with MySQL prior to 5.1.41.

Approved by Heikki (on IM).
pull/374/head
calvin 16 years ago
parent
commit
98b3899f45
  1. 5
      handler/ha_innodb.cc
  2. 2
      handler/ha_innodb.h

5
handler/ha_innodb.cc

@ -7912,7 +7912,10 @@ ha_innobase::external_lock(
ulong const tx_isolation = thd_tx_isolation(ha_thd());
if (tx_isolation <= ISO_READ_COMMITTED
&& binlog_format == BINLOG_FORMAT_STMT
&& thd_binlog_filter_ok(thd))
#if MYSQL_VERSION_ID > 50140
&& thd_binlog_filter_ok(thd)
#endif /* MYSQL_VERSION_ID > 50140 */
)
{
char buf[256];
my_snprintf(buf, sizeof(buf),

2
handler/ha_innodb.h

@ -258,12 +258,14 @@ int thd_binlog_format(const MYSQL_THD thd);
*/
void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all);
#if MYSQL_VERSION_ID > 50140
/**
Check if binary logging is filtered for thread's current db.
@param thd Thread handle
@retval 1 the query is not filtered, 0 otherwise.
*/
bool thd_binlog_filter_ok(const MYSQL_THD thd);
#endif /* MYSQL_VERSION_ID > 50140 */
}
typedef struct trx_struct trx_t;

Loading…
Cancel
Save