Bug #27076 Cluster does not honor SQL_LOG_BIN flag
Submitted: 13 Mar 2007 10:45 Modified: 24 Apr 2007 2:47
Reporter: Mats Kindahl Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Replication Severity:S3 (Non-critical)
Version:5.1.17-BK OS:Any
Assigned to: Tomas Ulin CPU Architecture:Any

[13 Mar 2007 10:45] Mats Kindahl
Description:
Cluster engine writes to binary log even when SQL_LOG_BIN is set to zero (hence, nothing should be written to the binary log).

How to repeat:
mysql> create table t1 (a int, b int) engine=ndb;
Query OK, 0 rows affected (2.27 sec)

mysql> show create table t1\G
*************************** 1. row ***************************
       Table: t1
Create Table: CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

mysql> set SQL_LOG_BIN=0;
Query OK, 0 rows affected (0.00 sec)

mysql> insert into t1 values (1,1),(2,2);
Query OK, 2 rows affected (0.04 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> show binlog events;
+-------------------+-----+-------------+-----------+-------------+-------------------------------------------------------+
| Log_name          | Pos | Event_type  | Server_id | End_log_pos | Info                                                  |
+-------------------+-----+-------------+-----------+-------------+-------------------------------------------------------+
| master-bin.000001 |   4 | Format_desc |         1 |         105 | Server ver: 5.1.17-beta-debug-log, Binlog ver: 4      | 
| master-bin.000001 | 105 | Query       |         1 |         209 | use `test`; create table t1 (a int, b int) engine=ndb | 
| master-bin.000001 | 209 | Query       |         1 |         273 | BEGIN                                                 | 
| master-bin.000001 | 273 | Table_map   |         1 |          40 | table_id: 19 (test.t1)                                | 
| master-bin.000001 | 313 | Table_map   |         1 |          95 | table_id: 17 (mysql.ndb_apply_status)                 | 
| master-bin.000001 | 368 | Write_rows  |         1 |         137 | table_id: 17                                          | 
| master-bin.000001 | 410 | Write_rows  |         1 |         175 | table_id: 19                                          | 
| master-bin.000001 | 448 | Write_rows  |         1 |         213 | table_id: 19 flags: STMT_END_F                        | 
| master-bin.000001 | 486 | Query       |         1 |         551 | COMMIT                                                | 
+-------------------+-----+-------------+-----------+-------------+-------------------------------------------------------+
9 rows in set (0.00 sec)
[2 Apr 2007 5:24] Adam Dixon
Not in known cluster replication issues. Verified behavior via test case.
[18 Apr 2007 13:46] 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:

  http://lists.mysql.com/commits/24776

ChangeSet@1.2563, 2007-04-18 16:02:20+02:00, tomas@whalegate.ndb.mysql.com +9 -0
  Bug #27076 Cluster does not honor SQL_LOG_BIN flag
  - both for data schema operations
  - also make sure schema events vet the right server id when injected into the binlog
  - use same mechanism to signal server_id in bug#17095, and reserve some "id's" for flagging special conditions on the event, in this case do not log it
  - enable printing of server ids in the testcases to show that we cot it right
[18 Apr 2007 19:24] 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:

  http://lists.mysql.com/commits/24831

ChangeSet@1.2564, 2007-04-18 21:39:45+02:00, tomas@whalegate.ndb.mysql.com +3 -0
  Bug #27076
   - test case
[20 Apr 2007 17:16] Bugs System
Pushed into 5.1.18-beta
[24 Apr 2007 2:47] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.1.18 changelog.