Bug #16837 Missing #ifdef causes compile problem in --without-row-based-replication
Submitted: 27 Jan 2006 12:05 Modified: 22 Jun 2006 7:51
Reporter: Kristian Nielsen Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S3 (Non-critical)
Version:5.1.6 (latest bitkeeper) OS:Microsoft Windows (Windows/all)
Assigned to: Mats Kindahl CPU Architecture:Any

[27 Jan 2006 12:05] Kristian Nielsen
Found this building the "Release" configuration on Windows.

sql_class.cc does not compile in --without-row-based-replication.

I think it is a bug that Windows "Release" does not include row-based replication (and will fix that). This bug is that the sources should still compile under --without-row-based-replication.

The problem is this code at the end of sql/sql_class.cc (abbreviated):

int THD::binlog_query(THD::enum_binlog_query_type qtype,
                      char const *query, ulong query_len,
                      bool is_trans, bool suppress_use)
  int error= binlog_flush_pending_rows_event(true);
  switch (qtype)
    if (binlog_row_based)
    /* Otherwise, we fall through */

The two calls to binlog_flush_pending_rows_event() should be somehow protected with #ifdef HAVE_ROW_BASED_REPLICATION

How to repeat:
Source inspection, compile --without-row-based-replication
[31 Jan 2006 12:08] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[21 Jun 2006 14:17] Lars Thalmann
This was pushed into 5.1.12
[22 Jun 2006 7:51] MC Brown
This has been documented in the Changelog for 5.1.12:

Compilation on Windows would fail if row based replication was disabled using <option>--without-row-based-replication</option. (Bug #16837)