Skip to content

Commit

Permalink
Fix issue percona#18: slave crash on update with row based binary log…
Browse files Browse the repository at this point in the history
…ging

Summary:
ha_rocksdb::position() should not return rowid of the last read row,
it should get the rowid of the record passed as parameter.

Test Plan: ./mtr --suite=rocksdb && ./mtr t/rocksdb*test

Reviewers: yoshinorim

Reviewed By: yoshinorim

Subscribers: hermanlee4, maykov, jonahcohen

Differential Revision: https://reviews.facebook.net/D31983
  • Loading branch information
spetrunia authored and jtolmer committed Jan 5, 2016
1 parent 6cb22af commit b807f9f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mysql-test/suite/rocksdb/rpl_row_rocksdb.result
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,19 @@ pk
2
3
drop table t1;
#
# Issue #18: slave crash on update with row based binary logging
#
create table t1 (id int primary key, value int, value2 int, index(value)) engine=rocksdb;
insert into t1 values (1,1,1);
insert into t1 values (2,1,1);
insert into t1 values (3,1,1);
insert into t1 values (4,1,1);
insert into t1 values (5,1,1);
update t1 set value2=100 where id=1;
include/sync_slave_sql_with_master.inc
select * from t1 where id=1;
id value value2
1 1 100
drop table t1;
include/rpl_end.inc
18 changes: 18 additions & 0 deletions mysql-test/suite/rocksdb/rpl_row_rocksdb.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,23 @@ select * from t1;
connection master;
drop table t1;

--echo #
--echo # Issue #18: slave crash on update with row based binary logging
--echo #
create table t1 (id int primary key, value int, value2 int, index(value)) engine=rocksdb;
insert into t1 values (1,1,1);
insert into t1 values (2,1,1);
insert into t1 values (3,1,1);
insert into t1 values (4,1,1);
insert into t1 values (5,1,1);
update t1 set value2=100 where id=1;

--source include/sync_slave_sql_with_master.inc
connection slave;
select * from t1 where id=1;

connection master;
drop table t1;

--source include/rpl_end.inc

0 comments on commit b807f9f

Please sign in to comment.