[Commits] bdb8acc: Fix Issue #1: Enable Row-based binlogging and disable statement-based.

Sergei Petrunia psergey at askmonty.org
Fri Jul 25 20:32:19 EEST 2014


revision-id: bdb8accbd4e285151ce0b047596884685e8c2864
parent(s): 3dcf732135ed5865c3561d86465c0b4879788782
committer: Sergei Petrunia
branch nick: webscalesql-5.6
timestamp: 2014-07-25 21:32:19 +0400
message:

Fix Issue #1: Enable Row-based binlogging and disable statement-based.

-----------------------

 mysql-test/suite/rocksdb/rpl_row_rocksdb.cnf    |    7 +++++++
 mysql-test/suite/rocksdb/rpl_row_rocksdb.result |   19 +++++++++++++++++++
 mysql-test/suite/rocksdb/rpl_row_rocksdb.test   |   23 +++++++++++++++++++++++
 storage/rocksdb/ha_rocksdb.h                    |    2 +-
 4 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/mysql-test/suite/rocksdb/rpl_row_rocksdb.cnf b/mysql-test/suite/rocksdb/rpl_row_rocksdb.cnf
new file mode 100644
index 0000000..b46b417
--- /dev/null
+++ b/mysql-test/suite/rocksdb/rpl_row_rocksdb.cnf
@@ -0,0 +1,7 @@
+!include suite/rpl/my.cnf
+
+[mysqld.1]
+binlog_format=row
+[mysqld.2]
+binlog_format=row
+
diff --git a/mysql-test/suite/rocksdb/rpl_row_rocksdb.result b/mysql-test/suite/rocksdb/rpl_row_rocksdb.result
new file mode 100644
index 0000000..6f30414
--- /dev/null
+++ b/mysql-test/suite/rocksdb/rpl_row_rocksdb.result
@@ -0,0 +1,19 @@
+include/master-slave.inc
+Warnings:
+Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
+[connection master]
+drop table if exists t1;
+select @@binlog_format;
+@@binlog_format
+ROW
+create table t1 (pk int primary key) engine=rocksdb;
+insert into t1 values (1),(2),(3);
+include/sync_slave_sql_with_master.inc
+select * from t1;
+pk
+1
+2
+3
+drop table t1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rocksdb/rpl_row_rocksdb.test b/mysql-test/suite/rocksdb/rpl_row_rocksdb.test
new file mode 100644
index 0000000..2ec9a08
--- /dev/null
+++ b/mysql-test/suite/rocksdb/rpl_row_rocksdb.test
@@ -0,0 +1,23 @@
+source include/master-slave.inc;
+
+connection master;
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+connection master;
+
+select @@binlog_format;
+create table t1 (pk int primary key) engine=rocksdb;
+insert into t1 values (1),(2),(3);
+
+--source include/sync_slave_sql_with_master.inc
+connection slave;
+
+select * from t1;
+
+connection master;
+drop table t1;
+
+--source include/rpl_end.inc
+
diff --git a/storage/rocksdb/ha_rocksdb.h b/storage/rocksdb/ha_rocksdb.h
index b58ff04..3109914 100644
--- a/storage/rocksdb/ha_rocksdb.h
+++ b/storage/rocksdb/ha_rocksdb.h
@@ -174,7 +174,7 @@ public:
         If we don't set it, filesort crashes, because it assumes rowids are 
         1..8 byte numbers 
     */
-    return HA_BINLOG_STMT_CAPABLE | 
+    return HA_BINLOG_ROW_CAPABLE |
            HA_REC_NOT_IN_SEQ |
            HA_REQUIRE_PRIMARY_KEY |
            (pk_can_be_decoded? HA_PRIMARY_KEY_IN_READ_INDEX:0) |


More information about the commits mailing list